Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I'm looking for gevent for Python 2.7 for windows

However gevent depends upon greenlet and the .msi version I found fails to install and the egg for 2.6 refuses to install.

The msi version fails as follows.

C:\Windows\system32>easy_install greenlet
install_dir C:\Python27\Lib\site-packages\
Searching for greenlet
Reading http://pypi.python.org/simple/greenlet/
Reading http://bitbucket.org/ambroff/greenlet
Reading http://undefined.org/python/#greenlet
Best match: greenlet 0.3.1
Downloading http://pypi.python.org/packages/source/g/greenlet/greenlet-0.3.1.tar.gz#md5=8d75d7f3f659e915e286e1b0fa0e1c4d
Processing greenlet-0.3.1.tar.gz
Running greenlet-0.3.1\setup.py -q bdist_egg --dist-dir c:\users\ian\appdata\local\temp\easy_install-1epg28\greenlet-0.3.1\egg-dist-tmp-mqhu3n
C:\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'repository'
  warnings.warn(msg)
greenlet.c
greenlet.c : fatal error C1074: 'IDB' is illegal extension for PDB file:
error: Setup script exited with error: command '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe"' failed with exit status 2

C:\Windows\system32>

I guess this means that I have a wrong version of VS.

Is there anything else I can use?

I want to get PyQt4 so the GUI won't lock up if the database can't be reached or takes ages to reply.

like image 401
Ian Avatar asked Feb 01 '11 20:02

Ian


People also ask

What is gevent spawn?

gevent is a coroutine -based Python networking library that uses greenlet to provide a high-level synchronous API on top of the libev or libuv event loop. Features include: Fast event loop based on libev or libuv. Lightweight execution units based on greenlets.

What is gevent Eventlet?

gevent is a coroutine-based cooperative multitasking python framework that relies on monkey patching to make all code cooperative. Gevent actually draws its lineage from Eve Online which was implemented using Stackless Python which eventually evolved into eventlet which inspired gevent.

What is greenlet in Python?

greenlet 1.1. 3 The “greenlet” package is a spin-off of Stackless, a version of CPython that supports micro-threads called “tasklets”. Tasklets run pseudo-concurrently (typically in a single or a few OS-level threads) and are synchronized with data exchanges on “channels”.

How do you use gevent Gunicorn?

By default, Gunicorn uses a synchronous worker class to serve requests, but it can be easily configured to use gevent by simply adding -k gevent to the run command.


2 Answers

This worked for me:

  1. Grab the gevent installer from the Unofficial Windows Binaries for Python Extension Packages

  2. Install greenlet from that same site

And if you're on a 64-bit Windows 7 machine and are having trouble installing, read this too.

like image 128
Joe Avatar answered Nov 04 '22 06:11

Joe


You should ask the maintainer of greenlet to build .msi for Python 2.7.

I did it here: greenlet issue #17

Update: There are now builds for Python 2.7 on PyPI: http://pypi.python.org/pypi/greenlet

like image 41
Denis Avatar answered Nov 04 '22 06:11

Denis