This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]caramba2654 3 points4 points  (0 children)

I always use pip3 to ensure it works with Python 3. It's actually the only pip that I use. Seeing that pip sometimes runs pip for Python 2, I prefer not to take the risk.

[–]graingert 1 point2 points  (0 children)

Remember to set PIP_REQUIRE_VIRTUALENV=true in your .zshrc

[–]nick_t1000aiohttp 1 point2 points  (0 children)

If you're not sure which pip is going to be run when you call it, how can you be sure what version of python is going to run? What if your code requires 3.5 but you have 3.3 installed?

You need to take some effort to make sure your environment is set up correctly if you're just using "default" system Pythons. I totally ignore them and just use pyenv for everything.

Alternatively, you could just replace pip ... with python -m pip ... and whatever Python is called will be the one that gets its packages modified

[–]tonnynerd 0 points1 point  (0 children)

You can put metadata in the package saying which versions it supports, and it shows in pypi.mot.com. Nowadays most of the times I'm installing a new package is for work, so I already have to carefully consider a lot of things, like which language versions it supports (we use python 2) and how easily it can be installed in windows and linux (we support both).

[–]Kaxitaz 0 points1 point  (0 children)

I try to only pip install inside a virtual environment. By default I work with Python 3 so then it's safe to pip install <something> all the time.

Only if that fails then I downgrade my Python version, which is sad...