Dealing with multiple Python versions and PIP?

后端 未结 23 2810
走了就别回头了
走了就别回头了 2020-11-21 06:58

Is there any way to make pip play well with multiple versions of Python? For example, I want to use pip to explicitly install things to either my s

23条回答
  •  花落未央
    2020-11-21 07:23

    pip is also a python package. So the easiest way to install modules to a specific python version would be below

     python2.7 /usr/bin/pip install foo
    

    or

    python2.7 -m pip install foo
    

提交回复
热议问题