Debian伺服器之安裝Python3.7
阿新 • • 發佈:2019-01-10
1、系統環境介紹
1.1 系統版本
debian-9.6.0-amd64-netinst
1.2 系統核心
Linux lnnkee 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 GNU/Linux
2、下載安裝包
https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz
3、配置安裝環境
apt install libffi-dev #否則將會提示No module named‘_ctypes’
4、編譯安裝python
tar xvf Python-3.7.0.tar cd Python-3.7.0 ./configure --prefix=/usr/local/python3.7/ --enable-optimizations make && make install
5、設定預設python
ln -s /usr/local/python3.7/bin/python3.7 /usr/bin/python ln -s /usr/local/python3.7/bin/pip3.7 /usr/bin/pip
6、安裝完成