2

I would like to try zeroRPC but couldn't install the package properly. I am using the latest python_xy distribution (python 2.7.3) under windows 7 and I must say I don't have much experience with installing new modules since the distribution is allready pretty complete.

I pulled the master zeroRPC-python from gitHub and tried to do "python setup.py install"

I had a first problem with something like "impossible to locate vcvarsall.bat". I solved it by installing mingw as explained here error: Unable to find vcvarsall.bat

Then I could run the install untill the end, but now, when I import zerorpc, I get the following ImportError (only the end of the stack):

C:\Python27\lib\site-packages\gevent-0.13.8-py2.7-win32.egg\gevent\greenlet.py in <module>()
  4 import traceback
  5 from gevent import core
----> 6 from gevent.hub import greenlet, getcurrent, get_hub, GreenletExit, Waiter
  7 from gevent.timeout import Timeout
  8 

C:\Python27\lib\site-packages\gevent-0.13.8-py2.7-win32.egg\gevent\hub.py in <module>()
 28 
 29 try:
---> 30     greenlet = __import__('greenlet').greenlet
 31 except ImportError:
 32     greenlet = __import_py_magic_greenlet()

ImportError: No module named greenlet

I wonder more generally if I am following the right procedure to install new packages (under windows) or if there is a simpler way (safer with dependancies) that I would be overlooking (easy_install)? I must say I am very new to this and any hints or link to the relevant documentation would be appreciated.

Thanks in advance,

Samuel

Community
  • 1
  • 1
Samuel
  • 469
  • 4
  • 10
  • easy_install or pip are the easiest way to install modules. If have native part, that might cause some problem. In this case using [pypi](http://pypi.python.org) is useful, as most of the packages can be found there with windows installers... – Vajk Hermecz Nov 15 '12 at 10:36
  • `gevent` depends on [`greenlet`](http://pypi.python.org/pypi/greenlet) so you'll need to install it. I suggest you use the pre-compiled Windows installer for Python 2.7 available from [pypi](http://pypi.python.org/pypi/greenlet). – Pedro Romano Nov 15 '12 at 10:42
  • Thanks a lot, indeed, I could install pip with the procedure explained here for my windows 64 bits : http://stackoverflow.com/questions/4750806/how-to-install-pip-on-windows I got zeroRPC to work shortly after and I should be able to install things properly now – Samuel Nov 15 '12 at 20:08

2 Answers2

0

I was struggling with this question myself for a while now. The solution involves several components, and many answers out there seem to relate to different versions of those components that don't always play well together.

Here is the complete solution that worked for me, starting from an empty virtualenv:

mkvirtualenv myenv
python -m pip install --upgrade pip==6.0.8 wheel==0.24.0
pip install gevent-1.0.1-cp27-none-win32.whl pyzmq-13.1.0-cp27-none-win32.whl zerorpc==0.4.4

The first step installs wheel and upgrades pip itself to support wheel package installations. The next step installs binary wheels for gevent-1.0.1 (downloadable from this unofficial but extremely useful python windows binaries page) and pyzmq-13.1.0 (available here), and the zerorpc-0.4.4 package from source in the usual way.

Note that I hard-coded source package versions here (pip 6.0.8, wheel 0.24.0, zerorpc 0.4.4) because as I said other versions don't always follow the same build patterns. This may not be necessary and future versions may prove to work just as well together.

The final result for me:

(myenv) C:\work>pip freeze
gevent==1.0.1
greenlet==0.4.5
msgpack-python==0.4.5
pyzmq==13.1.0
wheel==0.24.0
zerorpc==0.4.4
Yonatan
  • 1,018
  • 14
  • 28
0

I used a slightly different way, I am using Anaconda + Jupyter to run my python notebooks. I used this link to zerorpc package, and installed using

conda install -c groakat zerorpc

which installed following -

enter image description here

Darpan
  • 5,193
  • 3
  • 45
  • 74