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

installation error on m1 mac Sonoma #780

Open
qiuruiyu opened this issue Nov 8, 2023 · 4 comments
Open

installation error on m1 mac Sonoma #780

qiuruiyu opened this issue Nov 8, 2023 · 4 comments

Comments

@qiuruiyu
Copy link

qiuruiyu commented Nov 8, 2023

Describe the bug
When I tried to use (#682) to install mujoco_py on my mac, error like:

ImportError: dlopen(/Users/joseph/miniforge3/envs/ppo/lib/python3.8/site-packages/mujoco_py/generated/cymj_2.1.2.14_38_macextensionbuilder_38.so, 0x0002): Library not loaded: @rpath/MuJoCo.framework/Versions/A/libmujoco.2.1.1.dylib
Referenced from: <34A1F6DB-46E9-36E0-AD4B-48B493C455DD> /Users/joseph/miniforge3/envs/ppo/lib/python3.8/site-packages/mujoco_py/generated/cymj_2.1.2.14_38_macextensionbuilder_38.so

I'm not sure whether it's because of my macos version, I have tried lots of ways to solve it but didn't succeed.

To Reproduce
with macos 14, mujoco 2.1.1, mujoco_py 2.1.12.14, then run script in (#682)

Expected behavior
successfully install mujoco_py and run with gymnasium

Error Messages
ImportError: dlopen(/Users/joseph/miniforge3/envs/ppo/lib/python3.8/site-packages/mujoco_py/generated/cymj_2.1.2.14_38_macextensionbuilder_38.so, 0x0002): Library not loaded: @rpath/MuJoCo.framework/Versions/A/libmujoco.2.1.1.dylib
Referenced from: <34A1F6DB-46E9-36E0-AD4B-48B493C455DD> /Users/joseph/miniforge3/envs/ppo/lib/python3.8/site-packages/mujoco_py/generated/cymj_2.1.2.14_38_macextensionbuilder_38.so
Reason: tried: '/Users/joseph/miniforge3/envs/ppo/lib/MuJoCo.framework/Versions/A/libmujoco.2.1.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/joseph/miniforge3/envs/ppo/lib/MuJoCo.framework/Versions/A/libmujoco.2.1.1.dylib' (no such file), '/Users/joseph/miniforge3/envs/ppo/lib/MuJoCo.framework/Versions/A/libmujoco.2.1.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/joseph/miniforge3/envs/ppo/lib/MuJoCo.framework/Versions/A/libmujoco.2.1.1.dylib' (no such file), '/Users/joseph/.mujoco/mujoco210/bin/MuJoCo.framework/Versions/A/libmujoco.2.1.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/joseph/.mujoco/mujoco210/bin/MuJoCo.framework/Versions/A/libmujoco.2.1.1.dylib' (no such file), '/Users/joseph/miniforge3/envs/ppo/lib/python3.8/site-packages/mujoco_py/generated/MuJoCo.framework/Versions/A/libmujoco.2.1.1.dylib' (no such file), '/opt/homebrew/Cellar/gcc@11/11.4.0/lib/gcc/11/gcc/aarch64-apple-darwin23/11/MuJoCo.framework/Versions/A/libmujoco.2.1.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/gcc@11/11.4.0/lib/gcc/11/gcc/aarch64-apple-darwin23/11/MuJoCo.framework/Versions/A/libmujoco.2.1.1.dylib' (no such file), '/opt/homebrew/Cellar/gcc@11/11.4.0/lib/gcc/11/gcc/MuJoCo.framework/Versions/A/libmujoco.2.1.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/gcc@11/11.4.0/lib/gcc/11/gcc/MuJoCo.framework/Versions/A/libmujoco.2.1.1.dylib' (no such file), '/opt/homebrew/Cellar/gcc@11/11.4.0/lib/gcc/11/MuJoCo.framework/Versions/A/libmujoco.2.1.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/gcc@11/11.4.0/lib/gcc/11/MuJoCo.framework/Versions/A/libmujoco.2.1.1.dylib' (no such file), '/Users/joseph/miniforge3/envs/ppo/lib/MuJoCo.framework/Versions/A/libmujoco.2.1.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/joseph/miniforge3/envs/ppo/lib/MuJoCo.framework/Versions/A/libmujoco.2.1.1.dylib' (no such file), '/Users/joseph/miniforge3/envs/ppo/lib/MuJoCo.framework/Versions/A/libmujoco.2.1.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/joseph/miniforge3/envs/ppo/lib/MuJoCo.framework/Versions/A/libmujoco.2.1.1.dylib' (no such file), '/Users/joseph/.mujoco/mujoco210/bin/MuJoCo.framework/Versions/A/libmujoco.2.1.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/joseph/.mujoco/mujoco210/bin/MuJoCo.framework/Versions/A/libmujoco.2.1.1.dylib' (no such file), '/Users/joseph/miniforge3/envs/ppo/lib/python3.8/site-packages/mujoco_py/generated/MuJoCo.framework/Versions/A/libmujoco.2.1.1.dylib' (no such file), '/opt/homebrew/Cellar/gcc@11/11.4.0/lib/gcc/11/gcc/aarch64-apple-darwin23/11/MuJoCo.framework/Versions/A/libmujoco.2.1.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/gcc@11/11.4.0/lib/gcc/11/gcc/aarch64-apple-darwin23/11/MuJoCo.framework/Versions/A/libmujoco.2.1.1.dylib' (no such file), '/opt/homebrew/Cellar/gcc@11/11.4.0/lib/gcc/11/gcc/MuJoCo.framework/Versions/A/libmujoco.2.1.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/gcc@11/11.4.0/lib/gcc/11/gcc/MuJoCo.framework/Versions/A/libmujoco.2.1.1.dylib' (no such file), '/opt/homebrew/Cellar/gcc@11/11.4.0/lib/gcc/11/MuJoCo.framework/Versions/A/libmujoco.2.1.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/gcc@11/11.4.0/lib/gcc/11/MuJoCo.framework/Versions/A/libmujoco.2.1.1.dylib' (no such file), '/Users/joseph/miniforge3/envs/ppo/bin/../lib/MuJoCo.framework/Versions/A/libmujoco.2.1.1.dylib' (no such file), '/Users/joseph/miniforge3/envs/ppo/bin/../lib/MuJoCo.framework/Versions/A/libmujoco.2.1.1.dylib' (no such file)

Desktop (please complete the following information):

  • OS: [macOS 14.0]
  • Python Version [3.8.18] —— (conda, miniforge3, arm64)
  • Mujoco Version [2.1.1]
  • mujoco-py version [2.1.12.14]

Environment

  • output of: echo $LD_LIBRARY_PATH: ' ' (empty)
  • output of: echo $HOME: '/Users/joseph'
  • output of: echo $USER: joseph

Additional context
No

@joanvelja
Copy link

Did you end up solving this? I have been bumping my head onto this the entire day....

@qiuruiyu
Copy link
Author

Did you end up solving this? I have been bumping my head onto this the entire day....

Yes, after I carefully read the error, all of these direct to one is that, xxxx (no such file). It has been a long time since I solved the problem, I am not sure it is because the file name is not correct or the file is not exist. No matter how, you just need to rename or copy the file from somewhere else to the destination:
/Users/joseph/miniforge3/envs/ppo/lib/MuJoCo.framework/Versions/A/xxxxx.dylib

@Chenrf1121
Copy link

Did you solve this problem?

@qiuruiyu
Copy link
Author

qiuruiyu commented Apr 21, 2024 via email

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

3 participants