0

I am trying to run a program using the mujoco-py library. When I launch the program, a compilation error appears at the line import mujoco_py:

distutils.errors.CompileError: command '/usr/local/opt/llvm/bin/clang' failed with exit status 1

Here is my configuration:

OS version : Mac OS 12.1
Compiler version : Clang 12.0.0
Python version : 3.9.13
Conda version : 22.9.0

So I followed the instructions about this problem available here :

brew install llvm
brew install boost
brew install hdf5

# Add this to your .bashrc/.zshrc:
export PATH="/usr/local/opt/llvm/bin:$PATH"

export CC="/usr/local/opt/llvm/bin/clang"
export CXX="/usr/local/opt/llvm/bin/clang++"
export CXX11="/usr/local/opt/llvm/bin/clang++"
export CXX14="/usr/local/opt/llvm/bin/clang++"
export CXX17="/usr/local/opt/llvm/bin/clang++"
export CXX1X="/usr/local/opt/llvm/bin/clang++"

export LDFLAGS="-L/usr/local/opt/llvm/lib"
export CPPFLAGS="-I/usr/local/opt/llvm/include"

But the error persists. I tried with different version of python (3.6, 3.9 ...), different version of mujoco-py (2.0.2.8, 2.0.2.13, 2.1 ...) but nothing works.

I also tried to do the same installation on ubuntu 22.04 and I get a similar error:

distutils.errors.CompileError: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1

Would you know how to solve this problem ?

0 Answers0