pg_travel icon indicating copy to clipboard operation
pg_travel copied to clipboard

When i install mujoco and import mujoco_py, I got a problem ....

Open wonchul-kim opened this issue 6 years ago • 10 comments

I successfully installed mujoco, but when i import it, I got this problem...

-- PermissionError Traceback (most recent call last) /usr/local/lib/python3.5/dist-packages/lockfile/linklockfile.py in acquire(self, timeout) 18 try: ---> 19 open(self.unique_name, "wb").close() 20 except IOError:

PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.5/dist-packages/mujoco_py-1.50.1.59-py3.5.egg/mujoco_py/generated/wonchul-60572700.8099-2917094554558463988'

I followed all you mentioned...

Could you help me?

wonchul-kim avatar Oct 11 '18 00:10 wonchul-kim

In your saying, "but when i import it" means you write this..?

'>> import mujoco_py

You got PermissionError this part, right?

I cannot sure perfectly but i recommend to write 'sudo' like below:

#If you use ipython or python, as known as python interpreter. $ sudo python3

and then,

'>> import mujoco_py

#Else you write your own code like foo.py and you execute command 'python3 foo.py' $ sudo python3 foo.py

As i said, i'm not sure what is correct solution. So, i need your help. If you tried my suggestions or information from web, please upload screenshot file(s) what you tried as much as possible.

If you do so, i may reproduce your situation.

Thank you for your question.

rrbb014 avatar Oct 11 '18 01:10 rrbb014

Yes, I did import mujoco_py and then, this came up

screenshot from 2018-10-11 10-56-08 screenshot from 2018-10-11 10-57-25

wonchul-kim avatar Oct 11 '18 01:10 wonchul-kim

During write intallation guide, i didn't use jupyter notebook. So, now i don't know solution before doing it. However, maybe you want to solve your problem quickly.

I will search solution and inform to you soon.

If you find some solution, please inform to us. Thanks

rrbb014 avatar Oct 11 '18 02:10 rrbb014

Thank you for your help.

if you have time, please help me to find some solution.

I tried many things, but i couldn't find any of solutions....

wonchul-kim avatar Oct 11 '18 02:10 wonchul-kim

First, you change your environment from jupyter to command-line.

I also cannot find some solution yet.

rrbb014 avatar Oct 11 '18 03:10 rrbb014

Although i don't try to test, i wish it will be hint for us. https://stackoverflow.com/questions/40195740/how-to-run-openai-gym-render-over-a-server

In this page, you can find this command:

$ xvfb-run -s "-screen 0 1400x900x24" jupyter notebook

FYI, "xvfb" is virtual display server.

Can you try this page's information, please?

rrbb014 avatar Oct 11 '18 03:10 rrbb014

First, I really thank you for your effort!

However, I don't think the last suggestion is relevant to my problem.

In my situation, I cannot even import mujoco-py... because of some permission...

2018년 10월 11일 (목) 오후 12:46, Minseo Gong [email protected]님이 작성:

Although i don't try to test, i wish it will be hint for us.

https://stackoverflow.com/questions/40195740/how-to-run-openai-gym-render-over-a-server

In this page, you can find this command:

$ xvfb-run -s "-screen 0 1400x900x24" jupyter notebook

FYI, "xvfb" is virtual display server.

Can you try this page's information, please?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/reinforcement-learning-kr/pg_travel/issues/16#issuecomment-428810716, or mute the thread https://github.com/notifications/unsubscribe-auth/AT7jwdFkTZf71YelCBm9odPKkN8KhlF1ks5ujr8TgaJpZM4XWkLL .

wonchul-kim avatar Oct 11 '18 04:10 wonchul-kim

Ok. As i said, there are two options what you can try.

  1. Change execution environment from Jupyter to Command line
  2. Once quit your current Jupyter, execute Jupyter again with 'sudo' command like, sudo jupyter notebook

rrbb014 avatar Oct 11 '18 05:10 rrbb014

There are still problems about your suggestions.

in the first one, although i execute environment on command line, i cannot still import mujoco... the same error comes up.

and for the second one, sudo jupyter notebook does not work...

2018년 10월 11일 (목) 오후 2:08, Minseo Gong [email protected]님이 작성:

Ok. As i said, there are two options what you can try.

  1. Change execution environment from Jupyter to Command line
  2. Once quit your current Jupyter, execute Jupyter again with 'sudo' command like, sudo jupyter notebook

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/reinforcement-learning-kr/pg_travel/issues/16#issuecomment-428822367, or mute the thread https://github.com/notifications/unsubscribe-auth/AT7jwdvOQOLGo7i3lH-Tl510wsMQfw9cks5ujtJLgaJpZM4XWkLL .

wonchul-kim avatar Oct 11 '18 05:10 wonchul-kim

I received the following error when trying to import mujoco_py:

PermissionError: [Errno 13] Permission denied: b'/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/mujoco_py/generated/mujocopy-buildlock'

I solved as follows:

cd /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/mujoco_py sudo chmod -R 777 ./ (change permission of all files in all subfolders recursively)

jamesheald avatar Dec 25 '19 21:12 jamesheald