ml-agents icon indicating copy to clipboard operation
ml-agents copied to clipboard

pip3 install PermissionError: [Errno 13] Permission denied: '/usr/local/bin/jupyter'

Open erwincoumans opened this issue 9 years ago • 16 comments

The docs mention: pip install . but it gives an error here (Mac OSX). pip install PermissionError: [Errno 13] Permission denied: '/usr/local/bin/jupyter'

pip install . --user solves it (better than sudo pip install .), perhaps update the doc or add a note?

erwincoumans avatar Sep 21 '17 21:09 erwincoumans

This was using the brew version of python3. This version of Python doesn't install jupyter on Mac properly When using Anaconda python3 there are no such issues. I guess you are using Anaconda on Mac?

erwincoumans avatar Sep 21 '17 21:09 erwincoumans

This bring up a good point. Python and python installs add a learning curve in just setting these types of environments up. Although there are a lot of platform variations and wouldnt expect to cover them all, a somewhat thorough walkthrough for common ones may make this project more accessible to many that arent familiar.

Banging your head trying to set it up builds character, but whatever :D

Have you thought of writing it up and pushing it here?

eagleEggs avatar Sep 21 '17 22:09 eagleEggs

Not yet, wrapping up the 3D Ball tutorial. "Type of Brain to Internal." -> there is just "External, Player and Heuristic' choices...

erwincoumans avatar Sep 21 '17 22:09 erwincoumans

Read the bottom of the Unity Setup readme. You have to enable_tensorflow in settings and import a package I believe.

eagleEggs avatar Sep 21 '17 22:09 eagleEggs

Hi @erwincoumans,

In particular, this section of the wiki: https://github.com/Unity-Technologies/ml-agents/wiki/Getting-Started-with-Balance-Ball#setting-up-tensorflowsharp-support-experimental should walk you through what is needed to add internal TF support. Please let me know if you run into any other issues.

awjuliani avatar Sep 21 '17 22:09 awjuliani

??? I have no problem with TF support, did I mention that anywhere?

This thread brings up 2 issues:

  1. pip install has permission issues, unless using Anaconda.
  2. There is no 'Internal' for brain,.

Or does TF installation add the 'Internal' option to Brain? If that is the case, it would be nice if the tutorial mentions that without TF install, the 'Internal' option is invisible/not available. Attached is an image. external

erwincoumans avatar Sep 21 '17 22:09 erwincoumans

The internal brain mode is only available once the Tensorflow sharp plugin is added to the project, the ENABLE_TENSORFLOW flag is added to the scripting symbols, and the editor is reset.

awjuliani avatar Sep 21 '17 22:09 awjuliani

ah, ok. I missed that piece of information, must have skipped that sentence in the docs.

erwincoumans avatar Sep 21 '17 22:09 erwincoumans

No worries. I'll edit the document to make it more explicit that the Internal mode will only appear once those prior steps are completed.

awjuliani avatar Sep 21 '17 22:09 awjuliani

To be more precise: I skipped the experimental TF paragraph and went right into "Embedding the trained model itself". It would be good to say you cannot skip that TF paragraph.

erwincoumans avatar Sep 21 '17 22:09 erwincoumans

One more little tidbit, relating to saving to the 'bytes' file:

You HAVE to terminate the PPO training, not just CAN. "you can stop the training process". I left it running, and then ran the last step, and it doesn't save the bytes file. Only when you hit the STOP button you can run the last step. Pretty obvious to jupyter users probably, but I barely use that tool.

erwincoumans avatar Sep 21 '17 22:09 erwincoumans

I appreciate the suggestions, and have rewritten parts of the final wiki section to hopefully make it more clear: https://github.com/Unity-Technologies/ml-agents/wiki/Getting-Started-with-Balance-Ball#embedding-trained-brain-into-unity-environment-experimental

awjuliani avatar Sep 21 '17 23:09 awjuliani

I got it to work finally. Step 6 was a bit tricky, since I hadn't use Unity before.

"Drag the <env_name>.bytes file from the Project window of the Editor to the Graph Model placeholder in the 3DBallBrain inspector window."

You need to drag it exactly into one of the boxes in that inspector window.

I think some video of the 3D Ball would be easier to follow for newcomers, but that would take time/resources to create.

Anyway, it works! (https://www.youtube.com/watch?v=NX1DmSWmqYE)

erwincoumans avatar Sep 21 '17 23:09 erwincoumans

Glad you were able to get it working!

I'll close the issue for now, but will make a point of making python instructions more clear. I also agree that a video walkthrough would be ideal, and we have it on our to-do list.

awjuliani avatar Sep 22 '17 00:09 awjuliani

This thread really helped me. Yes, @erwincoumans, some simple updates to the doc would really save a lot of time setting up. Specifically:

  1. brew version of python3 doesn't properly install Jupyter on a mac (I switched to Anaconda it works great now), and
  2. pip install --user . was needed to properly install dependencies

Thanks for your help guys!

saporter avatar Dec 31 '17 00:12 saporter

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Jan 04 '20 21:01 lock[bot]