kAldown kAldown - 3 months ago 22
Python Question

How to pip install for certain version of python

I need to install

requests
for python3

pip install requests


installs it for python2.7.

How to do this without
virtualenv
?

Answer

To resolve conflicting installation sites always follow the following steps:

  1. To install for python3 use: python3 -m pip install requests

  2. For python2 use: python2 -m pip install [any_module]

This will prevent any conflicts, which I hope is what you are asking.