下載python3:
wget http://cdn.npm.taobao.org/dist/python/3.6.5/Python-3.6.5.tgz
開始準備安裝
釋放文件:
tar -xvzf Python-3.5.6.tgz
進入目錄:
cd Python-3.5.6/
添加配置:(這裏配置自己的安裝目錄)
./configure --prefix=/usr/python
接下來編譯源碼:
make
執行安裝:
make install
踩坑總結:
1、報錯:
OSError: /usr/lib/python2.7/site-packages/lookup3.so: cannot open shared object file: No such file or directory
解決方案:
pip install python-jenkins
2、報錯:
AttributeError: module 'gitlab' has no attribute 'Gitlab'
解決:
pip3 install python-gitlab