question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Installing pip for multiple Python versions does not work with symlinks

See original GitHub issue

Environment

  • 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

  1. Install pip for Python 2.7 (python get-pip.py)
  2. cd /usr/local/bin, rm pip, ln -s pip2.7 pip
  3. Install pip for Python 3.6 (python3 get-pip.py)

Output

pip2.7 is now running 3.6

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
MichaelKim0407commented, Sep 7, 2019

Well, I did not mean to reopen this. It should be closed

1reaction
pradyunsgcommented, Jun 27, 2018

Ah. My bad. 😅

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found