-
Notifications
You must be signed in to change notification settings - Fork 813
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
A Working Installation Guide For M1 Mac #682
Comments
This is awesome!!! Thanks for sharing your workaround!! |
Get error on M1 new macbook pro |
I tried it, but get following:
|
On: |
I first had error
and then I run
but then I had error
|
Thank you! Following your steps help me fix this bug! |
You can follow @geyang steps with python 3.8 as well. If you don't already have |
When i run the sh file it brings the error: During handling of the above exception, another exception occurred: Traceback (most recent call last): Can someone help? |
i was getting errors like this a lot before trying to get it working. not exactly sure what i did to fix it but followed the instructions in the OP and its working. main thing I think might have played an issue for me was using brew that is x86 specific and thus all the pythons you install with conda/miniforge/pyenv were i386 (at least that is my understanding) required me to reinstall brew and removed old brew that is i386 specific |
Make sure to install MuJoCo 2.1.x (NOT 2.2.x as mentioned in #662). |
Thanks @geyang, this is still useful! |
:)
…On Tue, Aug 2, 2022 at 20:06 Nathan Lambert ***@***.***> wrote:
Thanks @geyang <https://github.com/geyang>, this is still useful!
—
Reply to this email directly, view it on GitHub
<#682 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEZ5WVDRLOXQ7PJGFEH3NTVXGZZDANCNFSM5NUTVSSA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I believe mujoco-py only works with 2.1.x. MuJoCo 2.2.x comes with m1 release support https://github.com/deepmind/mujoco/releases/tag/2.2.1 All you need to do is Someone made similar to mujocopy viewer with native MuJoCo 2.2.x: https://github.com/rohanpsingh/mujoco-python-viewer, which is a great starting point. I also found dm_control has many features and well designed. Personal Thoughts: (I maybe wrong), but I feel mujoco-py maybe less significant as MuJoCo releases newer versions with native viewer officially in python bindings. As for now, you may follow mujoco-python-viewer as starting point, and combine with native MuJoCo and dm_control. |
@jaku-jaku A lot of RL repositories still include Does |
Yeah, Based on my attempts with early installation with
Short answer, no. |
When I followed this instruction and install Mujoco_py. There still comes with this error, and I think it comes to a new version of M1?
Anyone, any suggestion? |
@louieworth your python binary is probably not arm64 one. Ensure you have installed arm64 version of anaconda3:
|
perfect! i have worked on it for my whole day! and it works for me,thank you!!! |
Thank you @geyang ! It works on my M1 macbook with Python 3.9. |
Thank you! It worked for me too. |
I use |
To expand on this: On my M1 Mac I had to uncheck |
anytime i have to create a new env for local dev of something that uses mujoco/gym/similar i run into slightly different issues somehow |
Thanks for your workaround! Your solution helped me solve the same problem I faced before.
My laptop is Macbook Pro with M1Pro and the version of python is 3.8, and my solution is to change the version of Cython by this code: Hope my solution can help others. |
Did anyone figure how to handle this error? |
Try In 2023 homebrew will install gcc-13 not gcc-11 Or brew install specifically |
Hi all, I am having trouble installing MuJoCo 2.1.1, specifically over this:
Where it says that Any clue on what I might be missing, @geyang @wookayin? I've been bumping my head on this the entire day. Best |
Hey @joanvelja , have you been able to figure this out ? Perhaps we can try troubleshooting together? |
Legend! |
Did you manage to fix? |
The fix still works till now on M3 MacOS Sonoma14.5. Here's the further patch pip install cffi=1.16.0
brew install gcc@11
#actually installed Cython 0.29.37
pip install "Cython<3.0"
#copy or make a softlink
cp -r /Applications/MuJoCo.app/Contents/Frameworks/MuJoCo.framework /Path/to/Conda/Env/lib/ |
For me (M2 Sonoma) the script finally worked after these steps:
|
I followed it and still it did not work for me It was throwing this error To solve this error, you have to download source code zip file from mujoco-2.1.1 release and copy the include folder and paste it $HOME/.mujoco/mujoco210 and then run python -c 'import mujoco_py' This worked for me |
It is becoming a bit difficult to see what is working vs what is not in Issue #662. So here is a working script that worked for me. A copy of this guide can be found at jaynes-starter-kit/docker/m1_mac_setup. This is adapted from @wookayin's script. The most crucial part for me is to use
sudo
to link the framework to the/usr/local/lib
folder. Without this step, it did not work. @nikhilweee's comment confirms this.Another key step is to remove the mujoco-py installation with a clean
rm -rf .../site-packages/mujoco-py
. This way the compiled binaries can be removed.Background
Mujoco-py currently does not support
mujoco2.1.1
. The first arm64 release, which is needed for M1 Macs, came out a few weeks ago. Thereforemujoco2.1.1
is needed in order to run MuJoCo natively on the M1 Mac.Pre-requisits:
Miniforge
as your Conda environmentglfw
viabrew install glfw
. Note the location for the installation*.dmg
. The newmujoco2.1.1
is released as a Framework. You can copy theMuJoCo.app
into/Applications/
folder.Installation Script
Make a file locally called
install-mujoco.sh
, and put the following into it.Enjoy!
The text was updated successfully, but these errors were encountered: