Installing pip for multiple Python versions does not work with symlinks
See original GitHub issueEnvironment
- pip version: 10.0.1
- Python version: 2.7.14 + 3.6.4
- OS: MacOS High Sierra
Description
At the time of installation, pip
, pipX
, and pipX.Y
will be written to /usr/local/bin
. If there are existing symlinks, e.g. pip
is symlinked to pipZ.W
, this will overwrite pip executables for different versions and obviously break things.
Expected behavior
Remove the symlink and write a new file.
How to Reproduce
- Install pip for Python 2.7 (
python get-pip.py
) cd /usr/local/bin
,rm pip
,ln -s pip2.7 pip
- Install pip for Python 3.6 (
python3 get-pip.py
)
Output
pip2.7
is now running 3.6
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
PIP Not working after Installing Python to /opt/ with Symbolic Link
This is a VM so I can easily go back in time. Is there a way I should've installed it so I dont...
Read more >Symbolic links in wheels - Discussions on Python.org
Hi, Is there any plan to support symbolic links in wheels? Context: we package rather large .so files and those .so files are...
Read more >Why doesnt creating a sym link from python to python 3 work?
I'd really like to understand why this is happening AND find a solutionn or a proper way to get my main python version...
Read more >Update pip/pip3 to Python 3.8 in Ubuntu
Changing the version associated to python3 is pretty easy to find instructions about. If you have multiple versions installed, you just need to ......
Read more >Why do i have four different default versions of python on my ...
python3 is usually just a symlink to another executable. You can get the location with whereis python3 , it's the first entry.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Well, I did not mean to reopen this. It should be closed
Ah. My bad. 😅