tmc / gevent-zeromq

pyzeromq gevent compat. lib
BSD 3-Clause "New" or "Revised" License
283 stars 47 forks source link

Can't install with pip #34

Open jikamens opened 12 years ago

jikamens commented 12 years ago

Can't install 0.2.5 with pip. See below for install log with errors in it.

"python setup.py install" works.

Using Python 2.7.3, pip 1.2, in a virtualenv.

Downloading/unpacking gevent-zeromq
  Downloading gevent_zeromq-0.2.5.tar.gz
  Running setup.py egg_info for package gevent-zeromq

Requirement already satisfied (use --upgrade to upgrade): pyzmq==2.2.0 in /home/qexec/virtual_envs/qexec/lib/python2.7/site-packages (from gevent-zeromq)
Requirement already satisfied (use --upgrade to upgrade): gevent in /home/qexec/virtual_envs/qexec/lib/python2.7/site-packages (from gevent-zeromq)
Requirement already satisfied (use --upgrade to upgrade): greenlet in /home/qexec/virtual_envs/qexec/lib/python2.7/site-packages (from gevent->gevent-zeromq)
Installing collected packages: gevent-zeromq
  Running setup.py install for gevent-zeromq
    building 'gevent_zeromq.core' extension
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/home/qexec/virtual_envs/qexec/local/lib/python2.7/site-packages -I/home/qexec/virtual_envs/qexec/local/lib/python2.7/site-packages/zmq/utils -I/usr/include/python2.7 -c gevent_zeromq/core.c -o build/temp.linux-x86_64-2.7/gevent_zeromq/core.o
    gcc: gevent_zeromq/core.c: No such file or directory
    gcc: no input files
    error: command 'gcc' failed with exit status 1
    Complete output from command /home/qexec/virtual_envs/qexec/bin/python2.7 -c "import setuptools;__file__='/home/qexec/virtual_envs/qexec/build/gevent-zeromq/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-87oeg3-record/install-record.txt --single-version-externally-managed --install-headers /home/qexec/virtual_envs/qexec/include/site/python2.7:
    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_zeromq

copying gevent_zeromq/poll.py -> build/lib.linux-x86_64-2.7/gevent_zeromq

copying gevent_zeromq/core.py -> build/lib.linux-x86_64-2.7/gevent_zeromq

copying gevent_zeromq/tests.py -> build/lib.linux-x86_64-2.7/gevent_zeromq

copying gevent_zeromq/__init__.py -> build/lib.linux-x86_64-2.7/gevent_zeromq

running build_ext

building 'gevent_zeromq.core' extension

creating build/temp.linux-x86_64-2.7

creating build/temp.linux-x86_64-2.7/gevent_zeromq

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/home/qexec/virtual_envs/qexec/local/lib/python2.7/site-packages -I/home/qexec/virtual_envs/qexec/local/lib/python2.7/site-packages/zmq/utils -I/usr/include/python2.7 -c gevent_zeromq/core.c -o build/temp.linux-x86_64-2.7/gevent_zeromq/core.o

gcc: gevent_zeromq/core.c: No such file or directory

gcc: no input files

error: command 'gcc' failed with exit status 1

----------------------------------------
Command /home/qexec/virtual_envs/qexec/bin/python2.7 -c "import setuptools;__file__='/home/qexec/virtual_envs/qexec/build/gevent-zeromq/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-87oeg3-record/install-record.txt --single-version-externally-managed --install-headers /home/qexec/virtual_envs/qexec/include/site/python2.7 failed with error code 1 in /home/qexec/virtual_envs/qexec/build/gevent-zeromq
Storing complete log in /home/qexec/.pip/pip.log
lkraider commented 11 years ago

The best fix would be to include the generated core.c file on the gevent-zeromq PyPI packages, so that Cython is not required when installing the module.

There are two workarounds I know of:

  1. Install manually, running python setup.py build && python setup.py install on the gevent-zeromq tree.
  2. Install Pyrex (from the same requirements file, for example) before installing gevent-zeromq, this somehow "fixes" setuptools into thinking it should compile the extension.