I installed python 2.7 on mine shared host (it already had python 2.6 but they didnt want to upgrade it or install any packages) and pip. Configured PYTHONPATH and PATH in .bashrc. I dont have root access to this machine.
When I am checking sys.path with mine python installation it does not reference anywhere this shared location.
I checked commands:
which python
which pip
output:
/home/mgx/python27/bin/pip
and both provides me to mine installation but using
pip --version
output:
pip 1.1 from /usr/local/lib/python2.6/dist-packages/pip-1.1-py2.6.egg (python 2.6)
I can see that it using version from /usr/ not mine. How can I force it to use mine pip version? When I try to install with mine pip version by direct address it everything works but the short pip command is using wrong one. Also strange is that 'which' command show the good one...
Edit: output of cat $(which pip) and outputs of previous commands
#!/home/mgx/python27/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==1.4.1','console_scripts','pip'
__requires__ = 'pip==1.4.1'
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.exit(
load_entry_point('pip==1.4.1', 'console_scripts', 'pip')()
)
pipis usually just a trivial Python script that imports and runs the real code viapkg_resources. Can youcat $(which pip)and paste it here? In particular, does it have a shebang line that points to the wrong Python and/or uses env instead of pointing directly?sys.patheven in your Python 2.7? Run your Python andprint sys.pathto see. If it is, we need to figure out why and fix that.whichis saying otherwise...pythonis running all right. Using/home/user/python27/bin/pipis working correctly.pip --version,$(which pip) --version, andenv pip --version. Are they all wrong, or just one of them?