ubutnu 升级python 方法

https://www.cnblogs.com/rixian/p/11332615.html

https://segmentfault.com/a/1190000018264955

注意建立符号链接,源地址与目的地址一定要用决定路径,sudo ln -s source destnation

 

subprocess.CalledProcessError: Command ‘(‘lsb_release’, ‘-a’)’ returned non-zero exit status 1.

解决方法
find / -name lsb_release
rm -rf /usr/bin/lsb_release
 

ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/opt/ptyhon3.8/lib/python3.8/site-packages/websockets-8.1.dist-info'
Consider using the `--user` option or check the permissions.

解决方法:添加--userll

sudo apt-get install libffi-dev

sudo apt-get install libffi-dev

 

pip install pymongo

 pip3 install pymongo

pip3 install weksockets

2.ModuleNotFoundError: No module named '_ctypes'
Makefile:1130: recipe for target 'install' failed
make: *** [install] Error 1

方法一:

sudo apt-get install --reinstall zlibc zlib1g zlib1g-dev
sudo apt-get install libffi-dev libssl-dev libreadline-dev -y

 方法二:

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

无论是一还是二,执行完成之后需要重新编译一次python源码,然后在验证。

configure: error: C compiler cannot create executables

checking for --without-gcc... no
checking for --with-icc... no
checking for arm-poky-linux-gnueabi-gcc... arm-poky-linux-gnueabi-gcc
checking whether the C compiler works... no
configure: error: in `/home/cxt/soft/Python-3.6.10':
configure: error: C compiler cannot create executables
See `config.log' for more details

这个一般是交叉工具编译链没有设置好导致。

https://www.lizenghai.com/archives/17868.html

交叉编译python for arm版本

https://blog.csdn.net/jgw2008/article/details/83384076

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值