My python learning journey - install python

download and install windows:

1. Download the installation package:

  Visit the official website: https://www.python.org/downloads/  download the version you want to install, here to download the latest version of the current 3.8:

   Select the 64-bit Windows.exe download installation:

2. Install

  1. The custom installation

  2. Add the python environment variable (must be on the hook)

  The next step is to back up on it

   win + r open cmd command input, if the input into the following command python interactive mode, the installation was successful. In python3 the pip python module installation time together has been installed, in order to install additional python modules are:pip install

 Linux download and install:

1. Installation may be used dependent python3.x

1 yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel gcc -y

2. Download compile and install python3.8

1 wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz
2 tar -xf Python-3.8.0.tgz
3 cd Python-3.8.0/
4 ./configure --prefix=/usr/local
5 make && make install

3. You can replace the soft link

  在centos7中自带了python2.7,可以选择更换也可以不换,不换的话用python执行脚本就是python2,用python3执行就是python3 

1 # 备份python2
2 mv  /usr/bin/python python.backup
3 # 软链接
4 ln -s /usr/local/bin/python3.6 /usr/bin/python

 

python3.8程序的执行文件:/usr/local/bin/python3.8

python3.8应用程序目录:/usr/local/lib/python3.8

python3中自带安装pip模块不用重新安装

 

 

Guess you like

Origin www.cnblogs.com/muxizZ/p/11871694.html