

(yes, this installs latests python, which is right now python3. I just tried a bunch of packages like numpy and plotly they all worked right away Install python3 (optional) brew install python Ok, if you haven't screwed up anything so far, you should be able to use pip with a peace of mind. bash_profileĪnd add these lines: export PATH="/usr/local/bin:/usr/local/sbin:$PATH"Įxport install python2 using brew: brew install will also install pip) If you don't have brew installed (firstly you should be ashamed of yourself):.Here is the trick: We are NOT using easy_install. Now that you fixed the permissions, you can go ahead and install a python2 interpreter that will NOT ever require sudo with pip and hence will install your packages just fine: (don't worry we will get to python3 as well) That's why we made everything belong to us Let's install the one and only python2 we will use!: That's why the next step is so important:īasically, everything in this folder is supposed to NOT require root priviliges, which if they do they give pip a hard time later on. Thus any attempt to install new python versions will seem to work fine for now, but will be a brat later on. Then there is a good chance you messed up permissions with some packages too. Here's the fun part: if you already messed up your python environment, What's important is how you install the new version.

If you have anaconda installed, get rid of that too:.In other words, delete old paths related to python.

bash_profile):ĭelete all lines that have amework in it. zprofile or whichever shell you are using (If you don't know what I'm talking about then it's. (source: but I changed it a bit to remove python3 too)Įdit whatever shell profile you have, like. Ls -l /usr/local/bin | grep './Library/Frameworks/amework/Versions/2.7' | awk '' | tr -d | xargs rm Otherwise you WILL have to reinstall macos, it WILL crash, don't do it.
