Pip Install not installing into correct directory?
This is what worked for me on Windows. The cause being multiple python installations
- update path with correct python
- uninstall pip using
python -m pip uninstall pip setuptools
- restart windows didn't work until a restart
Virtualenv is your friend
Even if you want to add a package to your primary install, it's still best to do it in a virtual environment first, to ensure compatibility with your other packages. However, if you get familiar with virtualenv, you'll probably find there's really no reason to install anything in your base install.
From the comments to the original question, it seems that you have multiple versions of python installed and that pip just goes to the wrong version.
First, to know which version of python you're using, just type which python
. You should either see:
which python
/Library/Frameworks/Python.framework/Versions/2.7/bin/python
if you're going to the right version of python, or:
which python
/usr/bin/python
If you're going to the 'wrong' version. To make pip go to the right version, you first have to change the path:
export PATH=/Library/Frameworks/Python.framework/Versions/2.7/bin/python:${PATH}
typing 'which python' would now get you to the right result. Next, install pip (if it's not already installed for this installation of python). Finally, use it. you should be fine now.