pip3 install PermissionError: [Errno 13] Permission denied: '/usr/local/bin/jupyter'
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?
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?
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?
Not yet, wrapping up the 3D Ball tutorial. "Type of Brain to Internal." -> there is just "External, Player and Heuristic' choices...
Read the bottom of the Unity Setup readme. You have to enable_tensorflow in settings and import a package I believe.
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.
??? I have no problem with TF support, did I mention that anywhere?
This thread brings up 2 issues:
- pip install has permission issues, unless using Anaconda.
- 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.

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.
ah, ok. I missed that piece of information, must have skipped that sentence in the docs.
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.
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.
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.
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
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)
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.
This thread really helped me. Yes, @erwincoumans, some simple updates to the doc would really save a lot of time setting up. Specifically:
- brew version of python3 doesn't properly install Jupyter on a mac (I switched to Anaconda it works great now), and
pip install --user .was needed to properly install dependencies
Thanks for your help guys!
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.