pip install fails due to pep 517
haraldschilly opened this issue ยท 1 comments
Hi, I had trouble running pip3 install nle
on Ubuntu 22.04.
below, notice it says pyproject.toml
, not setup.py
. My guess is, this is due to those new-ish build isolations.
What did help (workaround ๐ ) is pip3 install --no-use-pep517 nle
Building wheels for collected packages: nle, gym
Building wheel for nle (pyproject.toml) ... error
error: subprocess-exited-with-error
ร Building wheel for nle (pyproject.toml) did not run successfully.
โ exit code: 1
โฐโ> [53 lines of output]
[...]
copying nle/tests/test_system.py -> build/lib.linux-x86_64-cpython-310/nle/tests
running build_ext
Traceback (most recent call last):
File "/usr/local/bin/cmake", line 5, in <module>
from cmake import cmake
ModuleNotFoundError: No module named 'cmake'
[end of output]
[...]
Environment
$ python -m nle.scripts.collect_env
Collecting environment information...
NLE version: 0.9.0
PyTorch version: 2.0.1+cu117
Is debug build: No
CUDA used to build PyTorch: 11.7
OS: Ubuntu 22.04.2 LTS
GCC version: (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
CMake version: version 3.26.0
Python version: 3.10
Is CUDA available: No
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
Versions of relevant libraries:
[pip3] numpy==1.22.1
[pip3] numpy-stl==2.17.1
[pip3] numpydoc==1.4.0
[pip3] numpyro==0.12.1
[pip3] numpysane==0.39
[pip3] torch==2.0.1
[pip3] torchaudio==2.0.1+cpu
[pip3] torchvision==0.15.2
[conda] Could not collect
pip and wheel:
$ pip3 --version
pip 23.1.2 from /usr/local/lib/python3.10/dist-packages/pip (python 3.10)
$ pip list | grep wheel
wheel 0.40.0
Additional context
Maybe you have to look into https://github.com/tttapa/py-build-cmake/ ?
This fixes Colab as well. You have to install with -v to see the cmake error, but it's the same
!sudo apt-get install -y build-essential autoconf libtool pkg-config \
python3-dev python3-pip python3-numpy git flex bison libbz2-dev
! pip install --no-use-pep517 nle
Any ideas how to fix this longer term? Would like to have a stable way to include NetHack in a bunch of containers from the pip package, without rebuilding from source