Python中文
首页
教程
问答
标签
搜索
登录
注册
我无法安装Geven
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>我需要为python2.7安装Gevent,但在尝试了几乎所有操作之后,我仍然没有安装它。<br/> 我有Python2.6.6,这里一切正常。。。但我需要python2.7+然后我安装python2.7.9,现在只有问题。。。 在我的项目的某些部分使用Python2.6之前,好吧,但是现在我的项目没有运行2.6和2.7,不知道为什么它停止使用2.6,但是nvm我需要使用2.7,但是。。。。我不能安装gevent,我已经安装了libevent devel一个greenlet,但是我不能安装gevent</p> <pre class="lang-sh prettyprint-override"><code># pip2.7 install gevent Collecting gevent Using cached gevent-1.0.1.tar.gz Requirement already satisfied (use --upgrade to upgrade): greenlet in /usr/local/lib/python2.7/site-packages (from gevent) Installing collected packages: gevent Running setup.py install for gevent configure: error: in `/tmp/pip-build-fpnLvN/gevent/build/temp.linux-x86_64-2.7/libev': configure: error: cannot run C compiled programs. If you meant to cross compile, use `--host'. See `config.log' for more details Running '/bin/sh /tmp/pip-build-fpnLvN/gevent/libev/configure > configure-output.txt' in /tmp/pip-build-fpnLvN/gevent/build/temp.linux-x86_64-2.7/libev building 'gevent.core' extension ccache gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -DLIBEV_EMBED=1 -DEV_COMMON= -DEV_CLEANUP_ENABLE=0 -DEV_EMBED_ENABLE=0 -DEV_PERIODIC_ENABLE=0 -Ibuild/temp.linux-x86_64-2.7/libev -Ilibev -I/usr/local/include/python2.7 -c gevent/gevent.core.c -o build/temp.linux-x86_64-2.7/gevent/gevent.core.o In file included from gevent/libev.h:2, from gevent/gevent.core.c:313: libev/ev.c:45:22: error: config.h: No such file or directory libev/ev.c:477:48: warning: "/*" within comment In file included from gevent/libev.h:2, from gevent/gevent.core.c:313: libev/ev.c:1531: warning: ‘ev_default_loop_ptr’ initialized and declared ‘extern’ In file included from gevent/libev.h:2, from gevent/gevent.core.c:313: libev/ev.c: In function ‘ev_io_start’: libev/ev.c:3554: warning: suggest parentheses around arithmetic in operand of ‘|’ libev/ev.c:4795:27: warning: "/*" within comment libev/ev.c:4796:27: warning: "/*" within comment error: command 'ccache' failed with exit status 1 Complete output from command /usr/local/bin/python2.7 -c "import setuptools, tokenize;__file__='/tmp/pip-build-fpnLvN/gevent/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-Ruy7Xb-record/install-record.txt --single-version-externally-managed --compile: running install running build running build_py creating build creating build/lib.linux-x86_64-2.7 creating build/lib.linux-x86_64-2.7/gevent copying gevent/resolver_thread.py -> build/lib.linux-x86_64-2.7/gevent copying gevent/socket.py -> build/lib.linux-x86_64-2.7/gevent copying gevent/threadpool.py -> build/lib.linux-x86_64-2.7/gevent copying gevent/util.py -> build/lib.linux-x86_64-2.7/gevent copying gevent/__init__.py -> build/lib.linux-x86_64-2.7/gevent copying gevent/monkey.py -> build/lib.linux-x86_64-2.7/gevent copying gevent/queue.py -> build/lib.linux-x86_64-2.7/gevent copying gevent/coros.py -> build/lib.linux-x86_64-2.7/gevent copying gevent/server.py -> build/lib.linux-x86_64-2.7/gevent copying gevent/_threading.py -> build/lib.linux-x86_64-2.7/gevent copying gevent/thread.py -> build/lib.linux-x86_64-2.7/gevent copying gevent/select.py -> build/lib.linux-x86_64-2.7/gevent copying gevent/hub.py -> build/lib.linux-x86_64-2.7/gevent copying gevent/fileobject.py -> build/lib.linux-x86_64-2.7/gevent copying gevent/wsgi.py -> build/lib.linux-x86_64-2.7/gevent copying gevent/pywsgi.py -> build/lib.linux-x86_64-2.7/gevent copying gevent/event.py -> build/lib.linux-x86_64-2.7/gevent copying gevent/greenlet.py -> build/lib.linux-x86_64-2.7/gevent copying gevent/ssl.py -> build/lib.linux-x86_64-2.7/gevent copying gevent/local.py -> build/lib.linux-x86_64-2.7/gevent copying gevent/subprocess.py -> build/lib.linux-x86_64-2.7/gevent copying gevent/threading.py -> build/lib.linux-x86_64-2.7/gevent copying gevent/os.py -> build/lib.linux-x86_64-2.7/gevent copying gevent/win32util.py -> build/lib.linux-x86_64-2.7/gevent copying gevent/baseserver.py -> build/lib.linux-x86_64-2.7/gevent copying gevent/lock.py -> build/lib.linux-x86_64-2.7/gevent copying gevent/backdoor.py -> build/lib.linux-x86_64-2.7/gevent copying gevent/pool.py -> build/lib.linux-x86_64-2.7/gevent copying gevent/resolver_ares.py -> build/lib.linux-x86_64-2.7/gevent copying gevent/timeout.py -> build/lib.linux-x86_64-2.7/gevent running build_ext configure: error: in `/tmp/pip-build-fpnLvN/gevent/build/temp.linux-x86_64-2.7/libev': configure: error: cannot run C compiled programs. If you meant to cross compile, use `--host'. See `config.log' for more details Running '/bin/sh /tmp/pip-build-fpnLvN/gevent/libev/configure > configure-output.txt' in /tmp/pip-build-fpnLvN/gevent/build/temp.linux-x86_64-2.7/libev building 'gevent.core' extension creating build/temp.linux-x86_64-2.7/gevent ccache gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -DLIBEV_EMBED=1 -DEV_COMMON= -DEV_CLEANUP_ENABLE=0 -DEV_EMBED_ENABLE=0 -DEV_PERIODIC_ENABLE=0 -Ibuild/temp.linux-x86_64-2.7/libev -Ilibev -I/usr/local/include/python2.7 -c gevent/gevent.core.c -o build/temp.linux-x86_64-2.7/gevent/gevent.core.o In file included from gevent/libev.h:2, from gevent/gevent.core.c:313: libev/ev.c:45:22: error: config.h: No such file or directory libev/ev.c:477:48: warning: "/*" within comment In file included from gevent/libev.h:2, from gevent/gevent.core.c:313: libev/ev.c:1531: warning: ‘ev_default_loop_ptr’ initialized and declared ‘extern’ In file included from gevent/libev.h:2, from gevent/gevent.core.c:313: libev/ev.c: In function ‘ev_io_start’: libev/ev.c:3554: warning: suggest parentheses around arithmetic in operand of ‘|’ libev/ev.c:4795:27: warning: "/*" within comment libev/ev.c:4796:27: warning: "/*" within comment error: command 'ccache' failed with exit status 1 ---------------------------------------- Command "/usr/local/bin/python2.7 -c "import setuptools, tokenize;__file__='/tmp/pip-build-fpnLvN/gevent/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-Ruy7Xb-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-fpnLvN/gevent </code></pre>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>安装这个对我有效</p> <pre><code>sudo apt-get install libevent-dev sudo apt-get install python-all-dev </code></pre> <p>然后</p> <pre><code>pip install greenlet pip install gevent </code></pre>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
使用Keras处理Tensorflow 2.0负采样的最佳方法
9 回答
使用Keras处理看不见的类
8 回答
使用Keras子类化创建自动编码器模型
1 回答
使用Keras定义CNN架构时出错
1 回答
使用keras实现NARX
8 回答
使用Keras实现NMAE作为度量
6 回答
使用Keras实现Seq2Seq与图像序列
6 回答
使用Keras实现多输入多模式
3 回答
使用Keras实现批量相关的损失
10 回答
使用Keras实现查找函数的最佳参数
4 回答
使用Keras实现的多分类神经网络
4 回答
使用keras对不同大小序列进行时间序列分类
5 回答
使用Keras对单词组合进行评分
9 回答
使用keras对文本数据进行预测
9 回答
使用Keras将二进制模式更改为分类模式时出现“获取值错误”
8 回答
使用keras将图像划分为子部分
9 回答
使用Keras将时间序列数据输入NN
4 回答
使用Keras将自动编码器与时间分布层堆叠时发生断言错误
8 回答
使用keras將兩個CNN串連起來
3 回答
使用Keras层时区分用户定义的变量
7 回答