1、安装python3.7
更新 sudo apt-get update sudo apt-get upgrade sudo apt-get dist-upgrade sudo apt-get install build-essential python-dev python-setuptools python-pip python-smbus sudo apt-get install build-essential libncursesw5-dev libgdbm-dev libc6-dev sudo apt-get install zlib1g-dev libsqlite3-dev tk-dev sudo apt-get install libssl-dev openssl sudo apt-get install libffi-dev
2、下载python wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz
3、解压 tar -xvzf Python-3.7.4.tgz
4、编译安装 ./configure make sudo make install
5、删除软链接,备份 rm -rf /usr/bin/python3 rm -rf /usr/bin/pip3
6、加入python3的软连接 ln -s /usr/local/bin/python3.7 /usr/bin/python3
7、添加 pip3 的软链接 ln -s /usr/local/bin/pip3.7 /usr/bin/pip3
1、pip URL 错误 pip3 install canopen -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
2、python错误 mv init.cpython-34.pyc init.cpython-37.pyc
|