Article From:

Dependency installation:

yum install gcc zlib zlib-devel libffi-devel readline readline-devel openssl openssl-devel
  1. gcc:Compile dependency
  2. readline:Solve the problem of invalid delete key in the python command line
  3. openssl:Solve the problem of PIP3 installation Python packet error: the following is the corresponding error message.
pip3 is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

Download Python:


   Here, take python3.5 as an example, you can also choose other versions.



tar -xvf Python-3.5.0.tgz   # Unzip to the current directory

  Enter the unzip Directory:

cd Python-3.5.0

  Specify the installation directory:

./configure --prefix=/usr/local/python3.5

  Compile and install:

make && make install

  Whether the test is successful or not:

/usr/local/python3.5/bin/python3   # Return to the python3.5 command line

  Create a soft link:

ln -s /usr/local/python3.5/bin/python3 /usr/bin/python3


Then you can use the python3 command in any directory to enter the command line of python3.5. It

Leave a Reply

Your email address will not be published. Required fields are marked *