python 3 安装gevent报 gcc错误

编程入门 行业动态 更新时间:2024-10-28 15:19:41

python 3 安装gevent报 gcc<a href=https://www.elefans.com/category/jswz/34/1771449.html style=错误"/>

python 3 安装gevent报 gcc错误

python3 安装gevent报错 GCC error, 按照网上大哥们的指导把,配套的库全部安装一遍后,问题依然没有解决,但是这个些如果没有安装的还是需要进行下安装:

yum install libevent-devel

yum install python devel

yum install python-gevent   

我的操作系统是centos7.6 于是尝试升级了下pip3到最新版本,然后进行gevent的安装就成功了:

python3 -m pip install --upgrade pip

pip3 install gevent==1.4.0

src/greenlet/greenlet_refs.hpp:179:19: warning: inline function ‘T* greenlet::refs::PyObjectPointer<T, <anonymous> >::borrow() const [with T = _greenlet; void (* TC)(void*) = greenlet::refs::GreenletChecker]’ used but never defined [enabled by default]
             inline T* borrow() const G_NOEXCEPT
                       ^
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-4fy1i1hg/greenlet/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-i_ykhstc-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-4fy1i1hg/greenlet/
[root@mongo_server01 tools]# python3 -m pip install --upgrade pip
WARNING: Running pip install with root privileges is generally not a good idea. Try `__main__.py install --user` instead.
Collecting pip
  Downloading .3.1-py3-none-any.whl (1.7MB)
    100% |████████████████████████████████| 1.7MB 675kB/s
Installing collected packages: pip
Successfully installed pip-21.3.1
You are using pip version 21.3.1, however version 22.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
[root@mongo_server01 tools]# pip3 install gevent==1.4.0
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Collecting gevent==1.4.0
  Using cached gevent-1.4.0-cp36-cp36m-manylinux1_x86_64.whl (5.5 MB)
Collecting greenlet>=0.4.14
  Downloading greenlet-2.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (513 kB)
     |████████████████████████████████| 513 kB 1.0 MB/s
Installing collected packages: greenlet, gevent
Successfully installed gevent-1.4.0 greenlet-2.0.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead:
[root@mongo_server01 tools]# pip3 list
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Package        Version
-------------- -------
gevent         1.4.0
greenlet       2.0.1
logger         1.4
numpy          1.19.5
pip            21.3.1
psutil         5.8.0
setuptools     39.2.0
zope.event     4.5.0
zope.interface 5.5.1
[root@mongo_server01 tools]#

更多推荐

python 3 安装gevent报 gcc错误

本文发布于:2024-03-10 03:34:48,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1726904.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   python   gevent   gcc

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!