Open pseudo-rnd-thoughts opened 12 months ago
Facing the same issue.
Same issue on my side
I solved it with pip install "cython<3"
Same issue on my side
Same
TYSM for figuring this out, wasted 3 hours today
TYSM for figuring this out, wasted 3 hours today
4 hours and 5 times recreate virtual environments 😇
already have Cython==0.29.36 but the same error exists when pip install mujoco_py==2.0.2.7
already have Cython==0.29.36 but the same error exists when pip install mujoco_py==2.0.2.7
Same
I am using mujoco-py==1.50.1.68
I cannot tell if this is directly related to cython 3 or not. I have 0.29.36 installed (and I've tried many versions from 0.27.2 on up) and the same error is occurring even on mujoco_py==2.0.2.13. I tried to determine if a patch to the underlying c++ compiler was at fault, but that does not seem to be the case.
I cannot tell if this is directly related to cython 3 or not. I have 0.29.36 installed (and I've tried many versions from 0.27.2 on up) and the same error is occurring even on mujoco_py==2.0.2.13. I tried to determine if a patch to the underlying c++ compiler was at fault, but that does not seem to be the case.
I would be surprised as our CI should be failing if this was true but it is not failing with cython < 3 also if you are getting the same issue with nogil
in the error then this is a cython >= 3
thing
I would be surprised as our CI should be failing if this was true but it is not failing with cython < 3 also if you are getting the same issue with
nogil
in the error then this is acython >= 3
thing
I now have it working with mujoco_py==2.0.2.5
, but no later 2.0.2.x
releases. I see that 2.0.2.5 is probably the last "official" 2.0.2 release, but PyPi is misleading.
I was able to use
pip install 'cython<3'
to compile mujoco-py 2.1.2.14 on Ubuntu 22.04, Python 3.8
same, cython<3
not works for me
I was facing the similar issue in numpy-1.23.3 build with cython 3.0.0, using pip3 install "cython<3" worked for me.
I solved it with
pip install "cython<3"
Does not work for me, I am trying to install safety-gym.
mujoco200 mujoco-py 2.1.2.14 Ubuntu 20.04 Python 3.6
Anyone found any other ways to resolve?
TIA
What is your current Cython version?
What is your current Cython version?
Cython 0.29.36
can you try updating your python to a higher version like 3.8.
can you try updating your python to a higher version like 3.8.
No progress.
I would be surprised as our CI should be failing if this was true but it is not failing with cython < 3 also if you are getting the same issue with
nogil
in the error then this is acython >= 3
thingI now have it working with
mujoco_py==2.0.2.5
, but no later2.0.2.x
releases. I see that 2.0.2.5 is probably the last "official" 2.0.2 release, but PyPi is misleading.
This Worked!
Surprisingly, uninstalling Cython fixed the problem for me.
Python: 3.8 gymnasium==0.29.1 mujoco==2.3.7
Mujoco version: 2.10
def _build_impl(self):
dist = Distribution({
"script_name": None,
"script_args": ["build_ext"]
})
dist.ext_modules = cythonize([self.extension],compiler_directives={'legacy_implicit_noexcept': True})
pip install -U Cython
I would be surprised as our CI should be failing if this was true but it is not failing with cython < 3 also if you are getting the same issue with
nogil
in the error then this is acython >= 3
thingI now have it working with
mujoco_py==2.0.2.5
, but no later2.0.2.x
releases. I see that 2.0.2.5 is probably the last "official" 2.0.2 release, but PyPi is misleading.This Worked!
It works for my.
I am use mujoco210 and mujoco_py==2.1.2.14
This command helps for the cymj
error:
I solved it with
pip install "cython<3"
Thanks!
I solved it with
pip install "cython<3"
Does not work for me, I am trying to install safety-gym.
mujoco200 mujoco-py 2.1.2.14 Ubuntu 20.04 Python 3.6
Anyone found any other ways to resolve?
TIA
mujoco-py 2.1.2.14 and mujoco200 are not match. Use mujoco_py 2.1.2.14 with mujoco210, or mujoco>2.0 <2.1 with mujoco200.
- Add a compiler directive " compiler_directives={'legacy_implicit_noexcept': True}" to the line 239 of mujoco_py/builder.py
def _build_impl(self): dist = Distribution({ "script_name": None, "script_args": ["build_ext"] }) dist.ext_modules = cythonize([self.extension],compiler_directives={'legacy_implicit_noexcept': True})
- Update Cython to the latest 3.0.2 version.
pip install -U Cython
This works for my problem. Thanks a lot.
my env:
- Add a compiler directive " compiler_directives={'legacy_implicit_noexcept': True}" to the line 239 of mujoco_py/builder.py
def _build_impl(self): dist = Distribution({ "script_name": None, "script_args": ["build_ext"] }) dist.ext_modules = cythonize([self.extension],compiler_directives={'legacy_implicit_noexcept': True})
- Update Cython to the latest 3.0.2 version.
pip install -U Cython
This works for my problem. Thanks a lot.
my env:
- Ubuntu 22.04
- python 3.8
- mujoco 2.1.0
- mujoco-py 2.1.2.14
- Cython 3.0.6
This works! Thanks
pip install Cython==3.0.0a10
works for me.
My env: Ubuntu 20.04 python 3.8.17 mujoco 2.1.0 mujoco-py 2.1.2.14
- Add a compiler directive " compiler_directives={'legacy_implicit_noexcept': True}" to the line 239 of mujoco_py/builder.py
def _build_impl(self): dist = Distribution({ "script_name": None, "script_args": ["build_ext"] }) dist.ext_modules = cythonize([self.extension],compiler_directives={'legacy_implicit_noexcept': True})
- Update Cython to the latest 3.0.2 version.
pip install -U Cython
This cause me "AttributeError: module ‘mujoco_py’ has no attribute 'utils’" after following the instructions from 4. https://blog.csdn.net/shouchen1/article/details/130002566 (it 's a Chinese blog), which is make chage to the test code provided by the official website:
import mujoco_py
from mujoco_py import utils # this line is added
import os
mj_path = utils.discover_mujoco() # change mujoco.utils->utils
xml_path = os.path.join(mj_path, 'model', 'humanoid.xml')
model = mujoco_py.load_model_from_path(xml_path)
sim = mujoco_py.MjSim(model)
the problem solved.
already have Cython==0.29.36 but the same error exists when pip install mujoco_py==2.0.2.7
Did you find a workaround for this?
Here are the steps that worked for me:
pip install "cython<3"
conda install gxx_linux-64
sudo ln -sf /usr/bin/gcc /home/dhruvstra/anaconda3/envs/argus/bin/x86_64-conda-linux-gnu-cc
The /home/dhruvstra/anaconda3/envs/argus/bin/x86_64-conda-linux-gnu-cc
should be your path to where conda linux gnu is installed. It might be located at usr/bin/
and the most important one was:
conda install -c conda-forge gcc=12.1.0
Describe the bug
Cannot assign type 'void (const char *) except * nogil' to 'void (*)(const char *) noexcept nogil'
To Reproduce Install cpython 3.0.0, import mujoco-py
Expected behavior mujoco-py compiles
Error Messages From gymnasium's CI