Python学习笔记: pip install 常见错误汇总
本机环境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
Python学习笔记: pip install 常见错误汇总的更多相关文章
- C语言学习笔记--内存操作常见错误
1. 野指针 (1)指针变量中的值是非法的内存地址,进而形成野指针 (2)野指针不是 NULL 指针,是指向不可用内存地址的指针 (3)NULL 指针并无危害,很好判断,也很好调试 (4)C 语言中无 ...
- CUBRID学习笔记 7 ms常见错误
基本不是权限问题,就是dll问题. 重新下载或应用dll注意版本. 权限的问题,先本机测试. 看看在web管理有无问题. 剩下的基本就简单了 欢迎转载 ,转载时请保留作者信息.本文版权归本人所有, ...
- Python学习笔记(十二)—Python3中pip包管理工具的安装【转】
本文转载自:https://blog.csdn.net/sinat_14849739/article/details/79101529 版权声明:本文为博主原创文章,未经博主允许不得转载. https ...
- python学习笔记--Django入门0 安装dangjo
经过这几天的折腾,经历了Django的各种报错,翻译的内容虽然不错,但是与实际的版本有差别,会出现各种奇葩的错误.现在终于找到了解决方法:查看英文原版内容:http://djangobook.com/ ...
- OpenCV之Python学习笔记
OpenCV之Python学习笔记 直都在用Python+OpenCV做一些算法的原型.本来想留下发布一些文章的,可是整理一下就有点无奈了,都是写零散不成系统的小片段.现在看 到一本国外的新书< ...
- Python学习笔记(六)
Python学习笔记(六) Ubuntu重置root密码 Ubuntu 16.4 目录结构 Ubuntu 命令讲解 1. Ubuntu重置root密码 启动系统,显示GRUB选择菜单(如果默认系统启动 ...
- Python学习笔记,day5
Python学习笔记,day5 一.time & datetime模块 import本质为将要导入的模块,先解释一遍 #_*_coding:utf-8_*_ __author__ = 'Ale ...
- Deep learning with Python 学习笔记(1)
深度学习基础 Python 的 Keras 库来学习手写数字分类,将手写数字的灰度图像(28 像素 ×28 像素)划分到 10 个类别 中(0~9) 神经网络的核心组件是层(layer),它是一种数据 ...
- Python学习笔记之类与对象
这篇文章介绍有关 Python 类中一些常被大家忽略的知识点,帮助大家更全面的掌握 Python 中类的使用技巧 1.与类和对象相关的内置方法 issubclass(class, classinfo) ...
随机推荐
- luoguP6624 [省选联考 2020 A 卷] 作业题(莫比乌斯反演,矩阵树定理)
luoguP6624 [省选联考 2020 A 卷] 作业题(莫比乌斯反演,矩阵树定理) Luogu 题外话: Day2一题没切. 我是傻逼. 题解时间 某种意义上说刻在DNA里的柿子,大概是很多人学 ...
- Rust-Sqlx极简教程
简介 sqlx 是 rust 中的一个数据库访问工具.具有以下特点: 异步:原生就支持异步,在并发性高的场合能够得到更好的支持 编译时检查查询:sqlx可以在 cargo build 的时候检查执行s ...
- springboot 配置文件的优先级和互补配置
一.springboot启动时候,配置文件的优先级如下所示由高到低.高优先级会覆盖低优先级相同配置,并且和低优先级形成互补配置. –file:./config/ ###根目录config目录下 –fi ...
- web.xml---配置文件概要
web.xml分发器: case1: springMvc的分发器: 作用:将匹配上的请求交由springMvc处理,路径会继续到达springMvc的处理器映射器 <servlet> &l ...
- prometheus-存储
采集到的样本以时间序列的方式保存在内存(TSDB 时序数据库)中,并定时保存到硬盘中 prometheus一般会保留15天 prometheus按照block块的方式来存储数据,每2小时为一个时间单位 ...
- MiL → SiL → PiL → HiL 是什么?
基于模型的快速原型开发通常分为四个过程:MiL → SiL → PiL → HiL 1. MiL(Model in Loop)模型在环 在PC上基于模型的测试,它的输出是经过验证的控制算法模型.验证 ...
- 制作任意波形发生器MAX038
- SphinxJS——把字符串编码成png图片的超轻量级开源库
体验地址:https://jrainlau.github.io/sp...项目地址:https://github.com/jrainlau/s... SphinxJS 一个能够把字符串编码成png图片 ...
- GoF设计模式-23大设计模式(表格)-程序员必备+必背
在GoF经典著作<设计模式:可复用面向对象软件的基础>中一共描述了23种设计模式. <Design Patterns:Elements of Reusable Object-Orie ...
- 简单的axios请求返回数据解构赋值
本地 data.json 文件 { "name": "大熊", "age": 18, "fnc": [ 1, 2, 3 ...