How to install python3 version of package via pip on Ubuntu?

前端 未结 17 1990
粉色の甜心
粉色の甜心 2020-11-22 11:03

I have both python2.7 and python3.2 installed in Ubuntu 12.04.
The symbolic link python links to python2.7

17条回答
  •  庸人自扰
    2020-11-22 11:35

    Execute the pip binary directly.

    First locate the version of PIP you want.

    jon-mint python3.3 # whereis ip
    ip: /bin/ip /sbin/ip /usr/share/man/man8/ip.8.gz /usr/share/man/man7/ip.7.gz
    

    Then execute.

    jon-mint python3.3 # pip3.3 install pexpect
    Downloading/unpacking pexpect
      Downloading pexpect-3.2.tar.gz (131kB): 131kB downloaded
      Running setup.py (path:/tmp/pip_build_root/pexpect/setup.py) egg_info for package pexpect
    
    Installing collected packages: pexpect
      Running setup.py install for pexpect
    
    Successfully installed pexpect
    Cleaning up...
    

提交回复
热议问题