ubuntu16 安装python3.7

https://blog.csdn.net/sinat_38682860/article/details/103276156

从官网下载

tar -zxvf xxxxx

创建安装目录
$ sudo mkdir -p /usr/local/python3

 配置、编译、安装
$ ./configure --prefix=/usr/local/python3 --enable-optimizations
make
sudo make install

添加 python37 的软链接

$ ln -s /usr/local/python3/bin/python3.7 /usr/bin/python37

添加 pip3 的软链接(这样pip3就是python3.7专用的,也可以起名为 pip37,不影响python3.5的pip3)

$ ln -s /usr/local/python3/bin/pip3.7 /usr/bin/pip37
安装pip

https://blog.csdn.net/weixin_42410566/article/details/112836836

安装setuptools

下载

wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-19.6.tar.gz#md5=c607dd118eae682c44ed146367a17e26

解压

tar xvf setuptools-19.6.tar.gz

重新编译安装

cd setuptools-19.6/

sudo python37 setup.py build

sudo python37 setup.py install

安装pip

下载

wget --no-check-certificate https://pypi.python.org/packages/source/p/pip/pip-8.0.2.tar.gz#md5=3a73c4188f8dbad6a1e6f6d44d117eeb

解压

tar xvf pip-8.0.2.tar.gz

编译&安装

sudo python37 setup.py build

sudo python37 setup.py install

apt-get update 问题
https://blog.csdn.net/weixin_30323631/article/details/99959098

解决依赖报错
https://www.jianshu.com/p/c49206bb8d55
apt-get purge 卸载之前报错的

sudo apt-get -f install
zlib 问题

zlib和zlib-devel

https://blog.51cto.com/xxaqustc/1166371

openssl

https://blog.csdn.net/dreamback1987/article/details/103494304

_ctypes 报错

https://blog.csdn.net/qq_42353939/article/details/94609591

sudo apt-get install libffi-dev

Ubuntu16.04 No module named _sqlite3 解决方案

https://blog.csdn.net/qq_37566910/article/details/82466741

posted @ 2021-03-25 14:48  AngDH  阅读(79)  评论(0编辑  收藏  举报