本机环境RHEL8, Python3.9


pip install: 无法安装最新版本的包

在pypi上查看pkg的页面,因为有些pip包的版本对特定的python版本有要求

pip install error: “Python.h: No such file or directory”

src/kerberos.c:18:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.

Fix

安装python版本对应的devel包, 比如

$ sudo yum install python38-devel  # for py38
$ sudo dnf install python39-devel # for py39

pip install error: “ERROR: Can not execute setup.py

ERROR: Can not execute `setup.py` since setuptools is not available in the build environment.

Fix: pip install -U setuptools

pip install error: No such file or directory: 'curl-config’

self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib64/python3.9/subprocess.py", line 1821, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'curl-config'

Fix:

dnf what-provides curl-config #输出是libcurl-devel
dnf install libcurl-devel

pip install error: “lber.h: No such file or directory”

Modules/common.h:15:10: fatal error: lber.h: No such file or directory
#include <lber.h>
^~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
[end of output] note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for python-ldap
Failed to build python-ldap

Fix:

 $ rpm -qa |grep openldap
openldap-clients-2.4.46-18.el8.x86_64
openldap-2.4.46-18.el8.x86_64
$ sudo dnf install openldap-devel

pip install error: “libxml/xmlreader.h: No such file or directory”

ext/ov_xml_reader.c:20:10: fatal error: libxml/xmlreader.h: No such file or directory
#include <libxml/xmlreader.h>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
[end of output] note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure × Encountered error while trying to install package.
╰─> ovirt-engine-sdk-python

Fix:

$ sudo dnf install install libxml2-devel

最新文章

  1. 在C#代码中应用Log4Net(五)将Log4Net正确地封装在自己的类库中并进行调用
  2. vue.js之绑定class和style
  3. Java提高篇——Java 异常处理
  4. PL/SQL连接Oracle客户端步骤
  5. 1秒30000QPS,前后端设计思路
  6. Linux netstat +awk 看攻击IP
  7. 已禁用对分布式事务管理器(MSDTC)的网络访问。请使用组件服务管理工具启用 DTC 以便在 MSDTC 安全配置中进行网络访问。
  8. PHP 用文件流方式展示图片
  9. HadoopDoctor:来自腾讯数据仓库TDW的MR诊断系统
  10. there be 句型
  11. html:标签原本属性
  12. 如何安装windows7系统
  13. Maven学习(三)
  14. SoapUI进行接口测试,怎么应对接口地址总是变化!
  15. CubeSuit+ ( CS+ for ca )
  16. 洛谷 P1914 小书童——密码【字符串+模拟】
  17. MOOC网视频下载并视频倍速播放,超简单哒,亲测可用,( •̀ ω •́ )y
  18. Android自定义View(三、深入解析控件测量onMeasure)
  19. 钉钉相关功能介入开发系列一:获取access_token
  20. spawn

热门文章

  1. Ajax是什么?包含什么技术?有什么作用?
  2. 解释一下Spring AOP里面的几个名词?
  3. SpringMVC常用的注解有哪些?
  4. 转载:2017百度春季实习生五道编程题[全AC]
  5. memcached 是怎么工作的?
  6. Centos6 编译安装Python3.6
  7. centos 安装solr6
  8. weevely使用小结
  9. 攻防世界php_rce
  10. (stm32学习总结)—GPIO位带操作