openai / mujoco-py

MuJoCo is a physics engine for detailed, efficient rigid body simulations with contacts. mujoco-py allows using MuJoCo from Python 3.
Other
2.89k stars 813 forks source link

pip install returns invalid activation key error when user uses conda env or virtualenv #158

Open avaziri opened 7 years ago

avaziri commented 7 years ago

Summary: Many users have reported that they get an error message with strange ascii characters and an invalid activation key warning when using conda environments or virtualenvs.

I think it is worth adding a warning to the readme.txt

Detailed Description: The error is:

���[��� �[V: not found
sh: 2: [
: not found
���[��� �[V: not found
sh: 2: [
: not found
���[��� �[V: not found
sh: 2: Syntax error: "(" unexpected
���[��� �[V: not found
sh: 2: Syntax error: "(" unexpected
ERROR: Invalid activation key

Reproducibility: Seen by these users: https://github.com/openai/mujoco-py/issues/66#issuecomment-321495588 https://github.com/openai/mujoco-py/issues/66#issuecomment-322507818 https://github.com/openai/mujoco-py/issues/66#issuecomment-322736838 https://github.com/openai/mujoco-py/issues/157#issue-271244520

avaziri commented 7 years ago

On second thought it might be a bad idea to suggest this method. Some users report that installing in this way prevents interoperability with gym, or causes segfaults.

vastsoun commented 6 years ago

Hi,

I too am having this issue. What is the recommended way to install then? I also want to use this with gym.

makdoudN commented 6 years ago

Hi,

Is there any solution to this problem ?

gntoni commented 6 years ago

@avaziri

Some users report that installing in this way prevents interoperability with gym, or causes segfaults.

Those interoperability issues were before the last version of gym was released, now it should work with mujoco 1.50 (If we could get past this ASCII error )

edit: The only solution I found is to clone the repo and run python setup.py install

danijar commented 6 years ago

Install the mujoco-py package from source:

github clone https://github.com/openai/mujoco-py.git
cd mujoco-py
pip3 install -e .

Help installer find MuJoCo and OpenGL dependencies:

export PATH=$PATH:~/.mujoco/mjpro150
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/.mujoco/mjpro150/bin
locate libGL  # To find the right path.
sudo ln -s <path>/libGL.so.1 /usr/lib/libGL.so

Compile bindings by importing the package once:

python3 -c 'import mujoco_py'
youkaichao commented 4 years ago

I met the same problem. Using pip install https://github.com/openai/mujoco-py/archive/1.50.1.1.zip fails. But if I download the zip file, and then use python setup.py install, it works.

GPrathap commented 4 years ago

I used what @youkaichao suggested and then got a permission this issue. To avoid this issue, I had to give permission to /usr/local/lib/python3.5/dist-packages/mujoco_py directory (sudo chmod 777 -R /usr/local/lib/python3.5/dist-packages/mujoco_py/* ) , after that its work fine.

Schopenhauer-loves-Hegel commented 1 year ago

pip install cython==0.29.36 try this