Open3

Windowsにpip+venv環境構築

lilacs2039lilacs2039

pathlibがインストールできない@Python3.10.x, Windows10

pip install pathlib がエラーになる

> pip install pathlib
Collecting pathlib
  Using cached pathlib-1.0.1.tar.gz (49 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      ERROR: Can not execute `setup.py` since setuptools is not available in the build environment.
      [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 the package mentioned above, not pip.
hint: See above for details.

環境:Python 3.10.x

> python -V
Python 3.10.2
lilacs2039lilacs2039

原因:pathlibがPython 3.10.x に対応してなかった。
Python3.9.xに下げたら成功。

> python -V
Python 3.9.10

> pip install pathlib
Collecting pathlib
  Using cached pathlib-1.0.1.tar.gz (49 kB)
Using legacy 'setup.py install' for pathlib, since package 'wheel' is not installed.
Installing collected packages: pathlib
    Running setup.py install for pathlib ... done
Successfully installed pathlib-1.0.1