How to install gevent on Windows?

2020-05-27 00:23发布

I'm trying to install gevent on Windows. In order to do that, I've downloaded and compiled libevent, then I run pip install gevent and get an error: Please provide path to libevent source with --libevent DIR. How can I pass the libevent option to setup.py using pip?

Thanks in advance, Ivan.

UPD: running pip install gevent --install-option="--libevent path_to_libevent" gives the same result.

6条回答
Melony?
2楼-- · 2020-05-27 00:55

Download the precompiled packages here:

This worked for me, python 2.7 32 bit build.

查看更多
SAY GOODBYE
3楼-- · 2020-05-27 00:55

If you're using 64bit Windows, download here, otherwise installation would fail.

查看更多
做自己的国王
4楼-- · 2020-05-27 00:57
闹够了就滚
5楼-- · 2020-05-27 01:01

How can I pass the libevent option to setup.py using pip?

c:\pip install --help
(...)
--global-option=GLOBAL_OPTIONS
                      Extra global options to be supplied to the
                      setup.pycall before the install command

See How can I set log level used by distutils when using pip?

查看更多
该账号已被封号
6楼-- · 2020-05-27 01:13

pip works for me on Windows 7 with 32-bit Python 2.7. You will need to install a C compiler and add a disutils.cfg file to \Lib\disutils under your Python install directory. I have Ming installed and my disutils.cfg looks like this:

[build]
compiler=mingw32
查看更多
Animai°情兽
7楼-- · 2020-05-27 01:20

Latest version has pre-compilled wheel:

pip install gevent==1.1rc1
查看更多
登录 后发表回答