Dealing with multiple Python versions and PIP?

后端 未结 23 2773
走了就别回头了
走了就别回头了 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:20

    Context: Archlinux

    Action:
    Install python2-pip:
    sudo pacman -S python2-pip

    You now have pip2.7:
    sudo pip2.7 install boto

    Test (in my case I needed 'boto'):
    Run the following commands:

    python2
    import boto
    

    Success: No error.

    Exit: Ctrl+D

提交回复
热议问题