Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mujoco compiling error #6

Open
Tanyash04 opened this issue Dec 17, 2024 · 0 comments
Open

Mujoco compiling error #6

Tanyash04 opened this issue Dec 17, 2024 · 0 comments

Comments

@Tanyash04
Copy link

I have this compiling error :

(dynamic-cloth-folding) tanya@tanya-VirtualBox:~$ python3
Python 3.8.20 (default, Oct 3 2024, 15:24:27)
[GCC 11.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.

import mujoco_py
Compiling /home/tanya/miniconda3/envs/dynamic-cloth-folding/lib/python3.8/site-packages/mujoco_py/cymj.pyx because it changed.
[1/1] Cythonizing /home/tanya/miniconda3/envs/dynamic-cloth-folding/lib/python3.8/site-packages/mujoco_py/cymj.pyx
performance hint: miniconda3/envs/dynamic-cloth-folding/lib/python3.8/site-packages/mujoco_py/cymj.pyx:67:5: Exception check on 'c_warning_callback' will always require the GIL to be acquired.
Possible solutions:
1. Declare 'c_warning_callback' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
2. Use an 'int' return type on 'c_warning_callback' to allow an error code to be returned.
performance hint: miniconda3/envs/dynamic-cloth-folding/lib/python3.8/site-packages/mujoco_py/cymj.pyx:104:5: Exception check on 'c_error_callback' will always require the GIL to be acquired.
Possible solutions:
1. Declare 'c_error_callback' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
2. Use an 'int' return type on 'c_error_callback' to allow an error code to be returned.

Error compiling Cython file:

...
See c_warning_callback, which is the C wrapper to the user defined function
'''
global py_warning_callback
global mju_user_warning
py_warning_callback = warn
mju_user_warning = c_warning_callback
^

miniconda3/envs/dynamic-cloth-folding/lib/python3.8/site-packages/mujoco_py/cymj.pyx:92:23: Cannot assign type 'void (const char ) except * nogil' to 'void ()(const char *) noexcept nogil'. Exception values are incompatible. Suggest adding 'noexcept' to the type of 'c_warning_callback'.

Error compiling Cython file:

...
See c_warning_callback, which is the C wrapper to the user defined function
'''
global py_error_callback
global mju_user_error
py_error_callback = err_callback
mju_user_error = c_error_callback
^

miniconda3/envs/dynamic-cloth-folding/lib/python3.8/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 the type of 'c_error_callback'.
Traceback (most recent call last):
File "", line 1, in
File "/home/tanya/miniconda3/envs/dynamic-cloth-folding/lib/python3.8/site-packages/mujoco_py/init.py", line 2, in
from mujoco_py.builder import cymj, ignore_mujoco_warnings, functions, MujocoException
File "/home/tanya/miniconda3/envs/dynamic-cloth-folding/lib/python3.8/site-packages/mujoco_py/builder.py", line 504, in
cymj = load_cython_ext(mujoco_path)
File "/home/tanya/miniconda3/envs/dynamic-cloth-folding/lib/python3.8/site-packages/mujoco_py/builder.py", line 110, in load_cython_ext
cext_so_path = builder.build()
File "/home/tanya/miniconda3/envs/dynamic-cloth-folding/lib/python3.8/site-packages/mujoco_py/builder.py", line 226, in build
built_so_file_path = self._build_impl()
File "/home/tanya/miniconda3/envs/dynamic-cloth-folding/lib/python3.8/site-packages/mujoco_py/builder.py", line 278, in _build_impl
so_file_path = super()._build_impl()
File "/home/tanya/miniconda3/envs/dynamic-cloth-folding/lib/python3.8/site-packages/mujoco_py/builder.py", line 239, in _build_impl
dist.ext_modules = cythonize([self.extension])
File "/home/tanya/miniconda3/envs/dynamic-cloth-folding/lib/python3.8/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize
cythonize_one(*args)
File "/home/tanya/miniconda3/envs/dynamic-cloth-folding/lib/python3.8/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one
raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: /home/tanya/miniconda3/envs/dynamic-cloth-folding/lib/python3.8/site-packages/mujoco_py/cymj.pyx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant