Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
pip install -e doesn't uninstall existing versions #1548
This has been an annoyance for me and my colleagues and I think I have a one line fix, but I figured that there is a good chance that this a known issue and that it's been discussed before and there's some reason not to change it.
A pip install of one version of a package will typically cause the previously installed version to be uninstalled, so there is only one version installed at a time.
If one installs a regular package from PyPI and then installs an editable package from git or from a local directory (e.g.:
$ virtualenv pip_test ... $ cd pip_test && source bin/activate $ pip install requests==0.5.0 ... Successfully installed requests Cleaning up... $ python -c 'import requests; print(requests.__version__)' 0.5.0 $ pip install -e ~/dev/git-repos/requests/ Obtaining file:///Users/marca/dev/git-repos/requests Running setup.py egg_info for package from file:///Users/marca/dev/git-repos/requests Installing collected packages: requests Running setup.py develop for requests Creating /private/tmp/pip_test/lib/python2.7/site-packages/requests.egg-link (link to .) Adding requests 2.0.1 to easy-install.pth file Installed /Users/marca/dev/git-repos/requests Successfully installed requests Cleaning up... $ python -c 'import requests; print(requests); print(requests.__version__)' <module 'requests' from '/Users/marca/dev/git-repos/requests/requests/__init__.pyc'> 2.0.1 $ pip uninstall requests Uninstalling requests: /private/tmp/pip_test/lib/python2.7/site-packages/requests.egg-link Proceed (y/n)? y Successfully uninstalled requests $ python -c 'import requests; print(requests); print(requests.__version__)' <module 'requests' from '/private/tmp/pip_test/lib/python2.7/site-packages/requests/__init__.pyc'> 0.5.0 $ pip uninstall requests Uninstalling requests: /private/tmp/pip_test/lib/python2.7/site-packages/requests-0.5.0-py2.7.egg-info /private/tmp/pip_test/lib/python2.7/site-packages/requests/__init__.py /private/tmp/pip_test/lib/python2.7/site-packages/requests/__init__.pyc ... Proceed (y/n)? y Successfully uninstalled requests
Any reason NOT to have
referenced this issue
Feb 10, 2014
referenced this issue
Aug 10, 2015
I think this is because