8000 Can't install on Windows? TypeError: expected str, bytes or os.PathLike object, not NoneType · Issue #68 · flier/pyfasthash · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Can't install on Windows? TypeError: expected str, bytes or os.PathLike object, not NoneType #68
Open
@anentropic

Description

@anentropic

I'm not on Windows myself but I was trying to help someone on Stackoverflow here:
https://stackoverflow.com/questions/76827266/how-do-i-install-pyhash

they get:

Collecting pyhash
  Using cached pyhash-0.9.3.tar.gz (602 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\ryanj\AppData\Local\Temp\pip-install-8qp2ra8w\pyhash_91547013240a4880a0295aea028a11c6\setup.py", line 38, in <module>
          os.path.join(os.environ.get('PYTHON_HOME'), 'include'),
        File "C:\Users\ryanj\AppData\Local\Programs\Python\Python310\lib\ntpath.py", line 104, in join
          path = os.fspath(path)
      TypeError: expected str, bytes or os.PathLike object, not NoneType
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with 

It looks the same as this earlier issue: #34 (I think that got closed because the reporter ended up manually setting PYTHON_HOME then ran into another compilation problem that got solved. But original issue problem got forgotten.)

There is another instance here: #65 (comment)

I am guessing that the problem may be because pyhash does this:

python_home = os.environ.get('PYTHON_HOME')

But in Python docs the env var is PYTHONHOME without underscore: https://python.readthedocs.io/en/latest/using/cmdline.html#envvar-PYTHONHOME

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0