mujoco-py
mujoco-py copied to clipboard
[help wanted]errors occured when import mujoco_py
the problems occured as follows>>> import mujoco_py
Compiling /usr/local/lib/python3.5/dist-packages/mujoco_py/cymj.pyx because it changed.
[1/1] Cythonizing /usr/local/lib/python3.5/dist-packages/mujoco_py/cymj.pyx
warning: /usr/local/lib/python3.5/dist-packages/mujoco_py/generated/../pxd/mjmodel.pxd:99:4: 'mjtDisableBit' redeclared
warning: /usr/local/lib/python3.5/dist-packages/mujoco_py/generated/../pxd/mjmodel.pxd:114:4: 'mjtEnableBit' redeclared
/ModuleNode.py", line 400, in generate_c_code
f = open_new_file(result.c_file)
File "/usr/local/lib/python3.5/dist-packages/Cython/Utils.py", line 57, in open_new_file
os.unlink(path)
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.5/dist-packages/mujoco_py/cymj.c'
Traceback (most recent call last):
File "
i tried to chmod 'cymi.c',but it doesn't work.
It looks like the permissions on your compiled files are strange.
What happens when you uninstall and reinstall without cache?
pip uninstall mujoco-py
pip install -U --no-cache --no-cache-dir mujoco-py
Facing same issue. Any solutions?
@rohansingh42 @shaneshbi did you get any solution to this yet? I'm facing the same
How about to use "pip install -e ." instead of "python setup.py install" for install? This solves a similar problem in my case.
I received the following error when trying to import mujoco_py:
PermissionError: [Errno 13] Permission denied: b'/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/mujoco_py/generated/mujocopy-buildlock'
I solved as follows:
cd /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/mujoco_py sudo chmod -R 777 ./ (change permission of all files in all subfolders recursively)
Facing the same issue. Any solutions?
Hello, my laptop is Macbook Pro with M1Pro, and I ever faced the same issue.I referred to this blog(https://blog.csdn.net/CCCDeric/article/details/131788795) and successfully solved this problem. This is a blog with chinese, It points out that you can try to run this code: pip install Cython==3.0.0a10
to change your version of Cython.