agrimgupta92 / derl

Code for "Embodied Intelligence via Learning and Evolution", Gupta et al, Nature Communications
164 stars 37 forks source link

Cython.Compiler.Errors #1

Open Josh00-Lu opened 1 year ago

Josh00-Lu commented 1 year ago

After running ./scripts/run_docker_cpu.sh python tools/evolution.py --cfg ./configs/evo/ft_test.yml NODE_ID 0

/user/miniconda/envs/docker_env/lib/python3.6/site-packages/mujoco_py/cymj.pyx:127:21: Cannot assign type 'void (const char *) except * nogil' to 'void (*)(const char *) noexcept nogil'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (const char *) except * nogil'.
Traceback (most recent call last):
  File "tools/evolution.py", line 18, in <module>
    from derl.envs.morphology import SymmetricUnimal
  File "/user/derl/derl/envs/morphology.py", line 12, in <module>
    from derl.utils import mjpy as mu
  File "/user/derl/derl/utils/mjpy.py", line 4, in <module>
    from mujoco_py import MjSim
  File "/user/miniconda/envs/docker_env/lib/python3.6/site-packages/mujoco_py/__init__.py", line 3, in <module>
    from mujoco_py.builder import cymj, ignore_mujoco_warnings, functions, MujocoException
  File "/user/miniconda/envs/docker_env/lib/python3.6/site-packages/mujoco_py/builder.py", line 506, in <module>
    cymj = load_cython_ext(mujoco_path)
  File "/user/miniconda/envs/docker_env/lib/python3.6/site-packages/mujoco_py/builder.py", line 105, in load_cython_ext
    cext_so_path = builder.build()
  File "/user/miniconda/envs/docker_env/lib/python3.6/site-packages/mujoco_py/builder.py", line 221, in build
    built_so_file_path = self._build_impl()
  File "/user/miniconda/envs/docker_env/lib/python3.6/site-packages/mujoco_py/builder.py", line 273, in _build_impl
    so_file_path = super()._build_impl()
  File "/user/miniconda/envs/docker_env/lib/python3.6/site-packages/mujoco_py/builder.py", line 234, in _build_impl
    dist.ext_modules = cythonize([self.extension])
  File "/user/miniconda/envs/docker_env/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize
    cythonize_one(*args)
  File "/user/miniconda/envs/docker_env/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one
    raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: /user/miniconda/envs/docker_env/lib/python3.6/site-packages/mujoco_py/cymj.pyx
66Lau commented 10 months ago

I got same error while running ./scripts/run_docker_cpu.sh python tools/evolution.py --cfg ./configs/evo/ft_test.yml NODE_ID 0

sunrainyg commented 7 months ago

pip install "cython<3" works for me

Yueee0-0 commented 2 months ago

pip install cython==3.0.0a10works for me At the same time, I made a new docker for visualization