目录
一: Windows 上安装Python3.6
官网下载地址: 点击前往下载
我们选择 Customize installation(自定义安装),然后:
到此我们Windows 就安装完毕.
二: Linux 上安装Python3.6
下载地址: 点击前往下载
wget https://www.python.org/ftp/python/3.6.7/Python-3.6.7.tgz
tar xzf Python-3.6.7.tgz
cd Python-3.6.7/
./configure --prefix=/usr/local/python36/
make && make install
### 如果要通过pyinstall能打包需要开启如下:
./configure --prefix=/usr/local/python36/ --enable-framework --enable-optimizations
然后我们创建一个软链,让系统可以识别Python命令
ln -s /usr/local/python36/bin/python3 /usr/bin/python3
ln -s /usr/local/python36/bin/pip3 /usr/bin/pip3
到此Python3.6.7在Linux上安装完毕,我们来测试一下:
[www@me03 Python-3.6.7]$ python3
Python 3.6.7 (default, Oct 25 2019, 18:15:52)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>