I had some trouble with the Python pip package manager, so I uninstalled it using
sudo pip uninstall pip
after which I reinstalled it again:
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
It installed without any errors, so I tried installing a package:
$ sudo pip install flask
sudo: pip: command not found
Apparently something went wrong. So to find out if it installed correctly I first looked up my site-packages folder:
>>> import site; print site.getsitepackages()[0]
/usr/local/Cellar/python/2.7.13_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
and then I had a look in that site-packages folder:
$ cd /usr/local/Cellar/python/2.7.13_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
$ ls -l | grep pip
drwxr-xr-x 34 kramer65 admin 1156 Aug 13 21:02 pip
drwxr-xr-x 10 kramer65 admin 340 Aug 13 21:02 pip-9.0.1.dist-info
So I think pip is installed correctly in the site-packages folder, but why is the pip command not linked to that anymore?
[EDIT]
Ok, following the tip of @OliverCharlesworth in the comments I reinstalled Python as a whole, but now pip
is still not working. So I reinstalled it again:
wget https://bootstrap.pypa.io/get-pip.py && python get-pip.py
it all installs fine, and I can do an import pip
in Python. The big problem is however, that the command pip
is not linked to the installed pip code.
Does anybody know how I can link the pip
command to the installed pip
code?
I guess I just need to add a symlink somewhere, but I'm unsure where it should point..