Comments (10)
Here's what worked for me (Ubuntu 22.04):
- Downgraded Python 3.12 to Python 3.8 by using
conda install python=3.8
- Install specific versions of setuptools and wheel:
pip3 install setuptools==65.5.0 "wheel<0.40.0"
- Install cython<3 using
pip3 install "cython<3"
- Replace
mujoco-py==2.0.2.13
withmujoco-py==2.0.2.5
My environment.yml
file looks like this:
name: diffuser
channels:
- defaults
- conda-forge
dependencies:
- python=3.8
- pip
- patchelf
- pip:
- -f https://download.pytorch.org/whl/torch_stable.html
- setuptools==65.5.0
- wheel<0.40.0
- mujoco-py==2.0.2.5
- numpy
- gym==0.18.0
- matplotlib==3.3.4
- torch==1.9.1+cu111
- typed-argument-parser
- git+https://github.com/Farama-Foundation/d4rl@f2a05c0d66722499bf8031b094d9af3aea7c372b#egg=d4rl
- scikit-image==0.17.2
- scikit-video==1.1.11
- gitpython
- einops
- ffmpeg
- ffprobe
- pillow
- tqdm
- pandas
- wandb
- flax >= 0.3.5
- jax <= 0.2.21
- ray==2.0.0
- crcmod # for fast gsutil rsync on large files
- google-api-python-client
- cryptography
- git+https://github.com/JannerM/doodad.git@janner
- gdown>=4.6.0
Other minor fixes I had to make:
- Convert
np.int
tonp.int64
in filebuffer.py
- Fix errors pertaining to LibGLEW.so and LibGL.so - This link helped a lot!
from diffuser.
After @NishanthARao 's version, which I couldn't build on Ubuntu 20.04, I tried using mujoco-py 2.0.2.5, and it worked. Here is the environment file:
name: diffuser
channels:
- defaults
- conda-forge
dependencies:
- python=3.8
- setuptools == 63.2.0
- wheel == 0.38.4
- pip == 22.2.2
- patchelf == 0.15.0.0
- Cmake
- cython == 0.29.36
- pip:
- -f https://download.pytorch.org/whl/torch_stable.html
- numpy
- gym==0.18.0
- mujoco-py==2.0.2.5
- matplotlib==3.3.4
- torch==1.9.1+cu111
- typed-argument-parser
- git+https://github.com/Farama-Foundation/d4rl@f2a05c0d66722499bf8031b094d9af3aea7c372b#egg=d4rl
- scikit-image==0.17.2
- scikit-video==1.1.11
- gitpython
- einops
- ffmpeg
- ffprobe
- pillow==7.2.0
- tqdm
- pandas
- wandb
- flax >= 0.3.5
- jax <= 0.2.21
- ray==2.0.0
- crcmod # for fast gsutil rsync on large files
- google-api-python-client
- cryptography
- git+https://github.com/JannerM/doodad.git@janner
- gdown>=4.6.0
I only had to change np.int
to np.int64
in file buffer.py (diffuser/datasets/).
from diffuser.
What version of pip do you have?
from diffuser.
I am using pip 23.0.1. and Ubuntu 22.04. I also will note that when manually installing the dependencies in the .yml file, the main issues were compatibility between mujoco and gym. For example, commenting out the gym=0.18.0 installation in the .yml file, I get the following errors:
Pip subprocess error:
Running command git clone --filter=blob:none --quiet https://github.com/JannerM/doodad.git /tmp/pip-req-build-z1m78mwk
Running command git checkout -b janner --track origin/janner
Switched to a new branch 'janner'
Branch 'janner' set up to track remote branch 'janner' from 'origin'.
Running command git clone --filter=blob:none --quiet https://github.com/aravindr93/mjrl /tmp/pip-install-xnyhflty/mjrl_e6e2358e931041e19fd0e94ac3e67343
error: subprocess-exited-with-error
× Building wheel for mujoco-py (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [95 lines of output]
running bdist_wheel
running build
performance hint: mujoco_py/cymj.pyx:67:5: Exception check on 'c_warning_callback' will always require the GIL to be acquired.
Possible solutions:
1. Declare the function 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 the function to allow an error code to be returned.
performance hint: mujoco_py/cymj.pyx:104:5: Exception check on 'c_error_callback' will always require the GIL to be acquired.
Possible solutions:
1. Declare the function 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 the function 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
^
------------------------------------------------------------
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 type 'void (const char *) except * nogil'.
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
^
------------------------------------------------------------
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 type 'void (const char *) except * nogil'.
Removing old mujoco_py cext /tmp/pip-install-xnyhflty/mujoco-py_ad196a9625654fe7992f3cbc753dd639/mujoco_py/generated/cymj_2.0.2.13_38_linuxcpuextensionbuilder_38.so
from diffuser.
I have the same issues on ubuntu 20.04
from diffuser.
I was able to resolve the issue with gym from https://stackoverflow.com/questions/76129688/why-is-pip-install-gym-failing-with-python-setup-py-egg-info-did-not-run-succ
I also ran into the second issue with mujoco-py but this issue went away after installing mujoco-py==2.0.2.5.
from diffuser.
I was able to resolve the issue with gym from https://stackoverflow.com/questions/76129688/why-is-pip-install-gym-failing-with-python-setup-py-egg-info-did-not-run-succ
I also ran into the second issue with mujoco-py but this issue went away after installing mujoco-py==2.0.2.5.
Can I see your environment.yml file? I tried your fix for the second issue, but my pip installation fails when I try create the environment
from diffuser.
I am using pip 23.0.1. and Ubuntu 22.04. I also will note that when manually installing the dependencies in the .yml file, the main issues were compatibility between mujoco and gym. For example, commenting out the gym=0.18.0 installation in the .yml file, I get the following errors:
Pip subprocess error: Running command git clone --filter=blob:none --quiet https://github.com/JannerM/doodad.git /tmp/pip-req-build-z1m78mwk Running command git checkout -b janner --track origin/janner Switched to a new branch 'janner' Branch 'janner' set up to track remote branch 'janner' from 'origin'. Running command git clone --filter=blob:none --quiet https://github.com/aravindr93/mjrl /tmp/pip-install-xnyhflty/mjrl_e6e2358e931041e19fd0e94ac3e67343 error: subprocess-exited-with-error
× Building wheel for mujoco-py (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [95 lines of output] running bdist_wheel running build performance hint: mujoco_py/cymj.pyx:67:5: Exception check on 'c_warning_callback' will always require the GIL to be acquired. Possible solutions: 1. Declare the function 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 the function to allow an error code to be returned. performance hint: mujoco_py/cymj.pyx:104:5: Exception check on 'c_error_callback' will always require the GIL to be acquired. Possible solutions: 1. Declare the function 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 the function 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 ^ ------------------------------------------------------------ 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 type 'void (const char *) except * nogil'. 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 ^ ------------------------------------------------------------ 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 type 'void (const char *) except * nogil'. Removing old mujoco_py cext /tmp/pip-install-xnyhflty/mujoco-py_ad196a9625654fe7992f3cbc753dd639/mujoco_py/generated/cymj_2.0.2.13_38_linuxcpuextensionbuilder_38.so
I have met same problem. Have you solved it right now?
from diffuser.
If you install mujoco-py-2.0.2.8, the environment will be created, but then you won't be able to use it due to compatibility issues. I tried to use the planning prompt - before which I downloaded the weights following the tutorial page - and it didn't work. Here is the latest environment file I have:
name: diffuser
channels:
- defaults
- conda-forge
dependencies:
- python=3.8
- setuptools == 63.2.0
- wheel == 0.38.4
- pip == 22.2.2
- patchelf
- Cmake
- pip:
- -f https://download.pytorch.org/whl/torch_stable.html
- numpy
- gym==0.18.0
- mujoco-py==2.0.2.13
- matplotlib==3.3.4
- torch==1.9.1+cu111
- typed-argument-parser
- git+https://github.com/Farama-Foundation/d4rl@f2a05c0d66722499bf8031b094d9af3aea7c372b#egg=d4rl
- scikit-image==0.17.2
- scikit-video==1.1.11
- gitpython
- einops
- ffmpeg
- ffprobe
- pillow==7.2.0
- tqdm
- pandas
- wandb
- flax >= 0.3.5
- jax <= 0.2.21
- ray==2.0.0
- crcmod # for fast gsutil rsync on large files
- google-api-python-client
- cryptography
- git+https://github.com/JannerM/doodad.git@janner
- gdown>=4.6.0
It gives the wheel for mujoco-py error in Ubuntu 20.4.6. I opened another issue and shared a working environment.yml file there ( #58 ), the one from Diffusion Policy paper, but they seem to use free-mujoco-py, among with different packages.
from diffuser.
- pip=24.0 # to install gym==0.18.0
from diffuser.
Related Issues (20)
- Error loading weights for maze_2d HOT 1
- A question about the antmaze bug
- The demo animation on the project website
- Maze2d Start Point
- I use the gym 0.19.0 nut it has wrongs whch says "No registered env with id: halfcheetah-medium-expert-v2" HOT 2
- Dataset availability HOT 2
- How did you generated datas for KUKA? HOT 2
- The question about "from tap import Tap" HOT 1
- How is conditioning implemented HOT 1
- error in kuka branch
- Conda environment cannot be created (wheel - mujoco-py problem) HOT 4
- Running evaluation of Maze2D dataset.
- Questions of the robot not completing the goal in the result visualizations of Kuka stacking experiment. HOT 4
- Questions of blocks being thrown out in the inference result of Kuka Stacking. HOT 4
- Lack of code files for training reward classifier of Kuka stacking.
- ModuleNotFoundError: No module named 'tap'
- Score in maze environment
- Question about apply_conditioning with self.predict_epsilon during training
- Cosine Beta Scheduler Bug
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diffuser.