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

前端 未结 17 2008
粉色の甜心
粉色の甜心 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:26

    Another way to install python3 is using wget. Below are the steps for installation.

    wget http://www.python.org/ftp/python/3.3.5/Python-3.3.5.tar.xz
    tar xJf ./Python-3.3.5.tar.xz
    cd ./Python-3.3.5
    ./configure --prefix=/opt/python3.3
    make && sudo make install
    

    Also,one can create an alias for the same using

    echo 'alias py="/opt/python3.3/bin/python3.3"' >> ~/.bashrc
    

    Now open a new terminal and type py and press Enter.

提交回复
热议问题