Python3 install on Ubuntu

Copyright notice: reproduced please indicate the source text address https://blog.csdn.net/wenfei11471/article/details/88932979

Install openssl method

1, openssl official website:

    https://www.openssl.org/

2, each version of source address:

    https://ftp.openssl.org/source/

3, the decompression Source Package:

    tar -xvf openssl-1.0.2r.tar.gz

4. Run the following commands install openssl:

    ./config --prefix=/opt/openssl-1.0.2r/ --openssldir=/opt/openssl-1.0.2r/openssl

    make

    sudo make install

5, / usr / include / openssl delete and create a soft link:

    sudo rm /usr/include/openssl -rf

    sudo ln -s /opt/openssl-1.0.2r/include/openssl openssl

6, a system path:

    sudo vim /etc /bash.bashrc

Add the last line

    PATH=/opt/openssl-1.0.2r/bin:$PATH

    sudo source /etc/bash.bashrc

 

Installation Python3 method

1, the official website to download source installation package, or alternatively xgz compression tar.xz compression format:

    https://www.python.org/downloads/source/

2, perform the following steps after decompressing

    ./configure  --prefix=/opt/python-3.7.2 --with-openssl=/opt/openssl-1.0.2r

    make

    sudo make install

3, the path setting system:

    sudo vim /etc /bash.bashrc

    Add the last line

    PATH=/opt/python-3.7.2/bin:$PATH

    sudo source /etc/bash.bashrc

4, Run python3 following display showing successful installation 5, the following method may be used according to the installation tool PIP3 download third party modules, such as: pip3 install pycharm     

Guess you like

Origin blog.csdn.net/wenfei11471/article/details/88932979