陈程的技术博客

  • 关于作者
全栈软件工程师
一个专注于技术研究创新的程序员
  1. 首页
  2. linux
  3. 正文

centos系统执行python或者其他的错误集合

2022年12月15日 882点热度 0人点赞 0条评论

问题


ModuleNotFoundError: No module named ‘_lzma’


方法:


yum install xz-devel
yum install python-backports-lzma
pip install backports.lzma
注意
需要重新编译python


====================================================================
问题


OSError: cannot load library 'libsndfile.so': libsndfile.so: cannot open shared object file: No such file or directory


方法:


yum install libsndfile


===================================================================
问题

ModuleNotFoundError: No module named '_ctypes'(Ubuntu下安装Python3.7.0)


方法:

执行如下命令安装依赖组件:
sudo apt-get update
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
sudo apt-get install libxpm-dev libxext-dev
sudo apt-get install zlib1g-dev libbz2-dev libssl-dev libncurses5-dev libsqlite3-dev libreadline-dev tk-dev libgdbm-dev libdb-dev libpcap-dev xz-utils libexpat1-dev liblzma-dev libffi-dev libc6-dev


===================================================================
问题


CentOS安装paddlepaddle出错:
regex_3/_regex.c:50:20: fatal error: Python.h: No such file or directory
#include "Python.h"
error: command 'gcc' failed with exit status 1


方法:


yum install python36-devel -y


===================================================================
问题

pip安装后报
“ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed?out”这是由于下载延迟导致,

 

方法:

pip --default-timeout=200 install -U?docker-compose”。

===================================================================

问题

pip安装报
类似” pkg_resources.DistributionNotFound: backports.ssl-match-hostname>=3.5”错误,


方法:


pip install --upgrade backports.ssl_match_hostname”
即可完成backports.ssl-match-hostname的更新。


===================================================================
问题

pip安装报
类似” Cannot uninstall 'requests'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall” 错误,


标方法:


sudo pip install --ignore-installed requests


===================================================================
问题

pip安装报
类似” ipapython 4.5.4 has requirement dnspython>=1.15, but you'll have dnspython 1.12.0 which is incompatible” 错误,


方法:


pip install psutil


===================================================================
问题

pip安装报
类似” Command "/usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-Y6TDnU/psutil/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-pVb4Xe/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-Y6TDnU/psutil/”错误,


方法:


yum install python-devel


===================================================================

标签: 暂无
最后更新:2022年12月15日

博主

全栈工程师,侧重项目技术解决方案规划和开发

打赏 点赞
< 上一篇

文章评论

取消回复

分类
  • .NET (65)
  • docker (3)
  • linux (12)
  • python (20)
  • web (14)
  • 小程序 (4)
  • 数据库 (2)
  • 未分类 (4)
  • 杂七杂八 (10)
标签聚合
js centos C# winform DevExpress nginx python linux
最新 热点 随机
最新 热点 随机
.NET开发手册标准参考 招募兼职前端开发 Centos安装dotnet6环境 VS上切换分支,vs编译运行出现bug,A fatal error was encountered彻底解决方案 用C#封装一个线程安全的缓存器,达到目标定时定量更新入库 C#通过特性的方式去校验指定数据是否为空
用C#写基于用户的协同过滤算法,推荐网站上你可能感兴趣的人 C#读写锁的一种方便写法 网页连接调起本地应用,注册表写入 ListHelper帮助类,DataTable和List之间转换 自己美化Winform界面和控件,简单绘制出当前软件的风格 paddleX 模型标注后数据集转换

COPYRIGHT © 2021 陈程的技术博客. ALL RIGHTS RESERVED.

THEME KRATOS MADE BY VTROIS