When trying to install the Gym - obstacle tower interface via pip install -e .e command on my university’s HPC running python version 3.10.4, I get the below message.
Does anyone know how feasible it is to do this? (I have managed to run the obstacle tower in previous versions of python, e.g. 3.8.)
Preparing metadata (setup.py) … done
Collecting mlagents-envs<0.19,>=0.17 (from obstacle-tower-env==4.1)
Using cached mlagents_envs-0.18.1-py3-none-any.whl (68 kB)
Collecting gym (from obstacle-tower-env==4.1)
Using cached gym-0.26.2-py3-none-any.whl
Collecting cloudpickle (from mlagents-envs<0.19,>=0.17->obstacle-tower-env==4.1)
Using cached cloudpickle-2.2.1-py3-none-any.whl (25 kB)
Collecting grpcio>=1.11.0 (from mlagents-envs<0.19,>=0.17->obstacle-tower-env==4.1)
Obtaining dependency information for grpcio>=1.11.0 from https://files.pythonhosted.org/packages/28/fa/c38a010d3fffcac07ef121abb34eb2c3db0876df74267ce5bde13c3a6ed7/grpcio-1.57.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata
Using cached grpcio-1.57.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.0 kB)
^[[A^[[ACollecting numpy<1.19.0,>=1.14.1 (from mlagents-envs<0.19,>=0.17->obstacle-tower-env==4.1)
Using cached numpy-1.18.5.zip (5.4 MB)
Installing build dependencies … done
Getting requirements to build wheel … done
Preparing metadata (pyproject.toml) … error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [59 lines of output]
Running from numpy source directory.
:461: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
/tmp/pip-install-4erng_3a/numpy_6202e2c025e845afa88d2d1d945b7170/tools/cythonize.py:75: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
required_version = LooseVersion(‘0.29.14’)
/tmp/pip-install-4erng_3a/numpy_6202e2c025e845afa88d2d1d945b7170/tools/cythonize.py:77: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
if LooseVersion(cython_version) < required_version:
warning: /tmp/pip-install-4erng_3a/numpy_6202e2c025e845afa88d2d1d945b7170/numpy/init.pxd:17:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See Deprecate conditional compilation · Issue #4310 · cython/cython · GitHub
warning: /tmp/pip-install-4erng_3a/numpy_6202e2c025e845afa88d2d1d945b7170/numpy/init.pxd:17:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See Deprecate conditional compilation · Issue #4310 · cython/cython · GitHub
warning: /tmp/pip-install-4erng_3a/numpy_6202e2c025e845afa88d2d1d945b7170/numpy/init.pxd:17:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See Deprecate conditional compilation · Issue #4310 · cython/cython · GitHub
Error compiling Cython file:
------------------------------------------------------------
...
def __init__(self, seed=None):
BitGenerator.__init__(self, seed)
self.rng_state.pcg_state = &self.pcg64_random_state
self._bitgen.state = <void *>&self.rng_state
self._bitgen.next_uint64 = &pcg64_uint64
^
------------------------------------------------------------
_pcg64.pyx:113:35: Cannot assign type 'uint64_t (*)(void *) except? -1 nogil' to 'uint64_t (*)(void *) noexcept nogil'
Processing numpy/random/_bounded_integers.pxd.in
Processing numpy/random/_bit_generator.pyx
Processing numpy/random/_common.pyx
Processing numpy/random/_pcg64.pyx
Traceback (most recent call last):
File "/tmp/pip-install-4erng_3a/numpy_6202e2c025e845afa88d2d1d945b7170/tools/cythonize.py", line 238, in <module>
main()
File "/tmp/pip-install-4erng_3a/numpy_6202e2c025e845afa88d2d1d945b7170/tools/cythonize.py", line 234, in main
find_process_files(root_dir)
File "/tmp/pip-install-4erng_3a/numpy_6202e2c025e845afa88d2d1d945b7170/tools/cythonize.py", line 225, in find_process_files
process(root_dir, fromfile, tofile, function, hash_db)
File "/tmp/pip-install-4erng_3a/numpy_6202e2c025e845afa88d2d1d945b7170/tools/cythonize.py", line 191, in process
processor_function(fromfile, tofile)
File "/tmp/pip-install-4erng_3a/numpy_6202e2c025e845afa88d2d1d945b7170/tools/cythonize.py", line 80, in process_pyx
subprocess.check_call(
File "/home/vaggelist/anaconda3/envs/ObstacleTower/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/vaggelist/anaconda3/envs/ObstacleTower/bin/python', '-m', 'cython', '-3', '--fast-fail', '-o', '_pcg64.c', '_pcg64.pyx']' returned non-zero exit status 1.
Cythonizing sources
Traceback (most recent call last):
File "/home/vaggelist/anaconda3/envs/ObstacleTower/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/home/vaggelist/anaconda3/envs/ObstacleTower/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/vaggelist/anaconda3/envs/ObstacleTower/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 149, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "/tmp/pip-build-env-wsjqdp2j/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 380, in prepare_metadata_for_build_wheel
self.run_setup()
File "/tmp/pip-build-env-wsjqdp2j/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 487, in run_setup
super(_BuildMetaLegacyBackend,
File "/tmp/pip-build-env-wsjqdp2j/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in run_setup
exec(code, locals())
File "<string>", line 488, in <module>
File "<string>", line 469, in setup_package
File "<string>", line 275, in generate_cython
RuntimeError: Running cythonize failed!
[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.