CentOS7 安装 Python3.8后 pip 安装报错

[[email protected] Python-3.8.0]# pip install bs4
Collecting bs4
  Using cached https://files.pythonhosted.org/packages/10/ed/7e8b97591f6f456174139ec089c769f89a94a1a4025fe967691de971f314/bs4-0.0.1.tar.gz
    ERROR: Command errored out with exit status 1:
     command: /usr/local/python3.8/bin/python3.8 -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"‘"‘/tmp/pip-install-alhbm0sp/bs4/setup.py‘"‘"‘; __file__=‘"‘"‘/tmp/pip-install-alhbm0sp/bs4/setup.py‘"‘"‘;f=getattr(tokenize, ‘"‘"‘open‘"‘"‘, open)(__file__);code=f.read().replace(‘"‘"‘\r\n‘"‘"‘, ‘"‘"‘\n‘"‘"‘);f.close();exec(compile(code, __file__, ‘"‘"‘exec‘"‘"‘))‘ egg_info --egg-base /tmp/pip-install-alhbm0sp/bs4/pip-egg-info
         cwd: /tmp/pip-install-alhbm0sp/bs4/
    Complete output (11 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/usr/local/python3.8/lib/python3.8/site-packages/setuptools/__init__.py", line 20, in <module>
        from setuptools.dist import Distribution, Feature
      File "/usr/local/python3.8/lib/python3.8/site-packages/setuptools/dist.py", line 36, in <module>
        from setuptools import windows_support
      File "/usr/local/python3.8/lib/python3.8/site-packages/setuptools/windows_support.py", line 2, in <module>
        import ctypes
      File "/usr/local/python3.8/lib/python3.8/ctypes/__init__.py", line 7, in <module>
        from _ctypes import Union, Structure, Array
    ModuleNotFoundError: No module named ‘_ctypes‘
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

解决方法:

  需要安装 libffi-devel

yum install libffi-devel -y

  

  重新编译安装

make install

  

验证:

[[email protected] Python-3.8.0]# python3
Python 3.8.0 (default, Dec  4 2019, 06:08:18)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys, setuptools, tokenize
>>>

  

  

原文地址:https://www.cnblogs.com/bcode/p/11985006.html

时间: 2024-10-08 07:25:03

CentOS7 安装 Python3.8后 pip 安装报错的相关文章

【亲测有效】Centos安装完成docker后启动docker报错docker: unrecognized service的两种解决方案

今天在学习Docker的时候 使用yum install docker安装完后启动不了,报错如下: [[email protected] ~]# service docker start docker: unrecognized service 一直停留在以上步骤,如果有遇到和我一样类似问题的小伙伴可以按照如下方法进行安装,即可安装成功~~ 方法一: 先移除docker [[email protected] ~]# yum remove docker 再移除docker-selinux(如果你之

Robot framework安装python3.7导入HttpLibrary.HTTP报错

问题原因:存在兼容性问题. 问题解决: 1.检查livetest,json是否已成功安装 (如果livetest也安装失败,则 下载https://files.pythonhosted.org/packages/de/77/7ab378ff9e62013f1756b64b1553e126ba7b3f3598bc9c5c8fc508c13d55/livetest-0.5.tar.gz 2.修改  \livetest-0.5\livetest\__init__.py 修改import httplib

centos6 安装python3.5后pip无法使用的处理

现象:安装pip后发现命令无法识别command not found 原因:which查看找到不到执行路径   find搜索发现安装后存放在/usr/local/python3.5/bin下,于是判断是因为没有注册路径的问题 解决:参考地址为https://lempstacker.com/tw/Installing-Python-3-5-on-CentOS-7/ http://blog.csdn.net/apn172/article/details/8868968 1.导出头文件: /usr/l

解决Linux 安装python3 .5 解决pip 安装无法成功问题ssl安全拦截无法pip安装库问题

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=4

安装python3.6后使用pip报错

安装python3.6后,pip是一起安装好的,安装目录再C:\Programs\Python\Python36-32\Scripts中. 在python终端模式下使用pip出现错误如下: 错误原因:pip不应在python终端模式下使用:直接在cmd下使用pip即可. 原文地址:https://www.cnblogs.com/feitian629/p/10362154.html

centos7 安装pip+python3.6以及pip安装错误解决办法

Centos7安装pip 1.执行:yum install python-pip 若没有python-pip包,先执行:yum -y install epel-release,再执行yum install python-pip 2.pip install --upgrade pip centos默认安装了python2.7 1.mkdir /usr/local/python3 3.安装依赖包: yum -y groupinstall "Development tools" 安装的时候可

解压版本Python,手动安装pip报错,pip得到报错&quot; No module named &#39;pip&#39; &quot;

解压版本Python,手动安装pip报错 λ pip Traceback (most recent call last): File "runpy.py", line 193, in _run_module_as_main File "runpy.py", line 86, in _run_code File "D:\tools\python-3.8.1-embed-amd64\Scripts\pip.exe\__main__.py", line

安装pytest-allure-adaptor后,运行报错:AttributeError: module &#39;pytest&#39; has no attribute &#39;allure&#39;

原因:因为pytest-allure-adaptor库基本被python3放弃了,运行很不友好,反正我运行就是报错 解决方法: 先卸载:pip uninstall pytest-allure-adaptor 再安装:pip allure-pytest 然后再去对应case的文件夹下面cmd里面运行: pytest -s -q --alluredir  report  (可以改为你想设的路径,如果是report默认当前目录下),就会生成report文件夹了 安装pytest-allure-adap

windows7安装Office 2013后,安装Visio 2013报错:安装程序找不到office.zh-cn

虽然windows 8.1(cn_windows_8.1_professional_vl_with_update_x64_dvd_4050293.iso)是款不错的系统,但是由于我的无线一直不能正常使用且经常出现不能正常更新,还有桌面卡住的几率比之前多太多了等先重回windows7 X64. 我安装的是cn_windows_7_ultimate_with_sp1_x64_dvd_u_677408.iso,使用正常,且之前也是使用的这款很稳定,安装Office 2013(cn_office_pro