1

I am trying to setup my python project to my local fedora 16 machine.I had clone the entire project using git.

Project is used redis server.

After i enter the command : python setup.py develop i got the below error

Installed /usr/lib/python2.7/site-packages/python_redis_log-0.1.2-py2.7.egg
error: Could not find required distribution python-redis-log>=9999

i already installed redis 2.7

anybody knows what is the issue here? help is highly appreciated.

PIP Freeze

tawlk]# pip freeze
IPy==0.75
Magic-file-extensions==0.2
Paste==1.7.5.1
PyYAML==3.10
SSSDConfig==1
Tempita==0.4
chardet==2.0.1
cupshelpers==1.0
decorator==3.3.2
distribute==0.6.24
ethtool==0.7
eventlet==0.9.17
firstboot==1.117
gps==2.95
greenlet==0.4.0
iniparse==0.4
iwlib==1.1
kitchen==1.0.0
-e git+https://github.com/Tawlk/kral.git@d1b8aacc3a2fa8c80049c392014842ed2f547f0d#egg=kral-dev
liveusb-creator==3.11.4
lockfile==0.9.1
lxml==3.0.1
nltk==2.0.4
numpy==1.6.2
policycoreutils-default-encoding==0.1
pyOpenSSL==0.12
pycryptsetup==0.1.4
pycups==1.9.59
pycurl==7.19.0
pygpgme==0.1
pykickstart==1.99.4
pyparted==3.8
python-bugzilla==0.6.2
python-meh==0.11
python-nss==0.12
python-redis-log==0.1.2
python-redis-logger==0.1.3
redis==2.7.2
scdate==1.9.67
scservices==0.101.7
scservices.dbus==0.101.7
sesearch==1.0
setools==1.0
setroubleshoot-default-encoding==0.1
simplejson==2.1.6
slip==0.2.17
slip.dbus==0.2.17
slip.gtk==0.2.17
sockjs-tornado==0.0.5
spambayes==1.1a6
stevedore==0.7.2
-e git+https://github.com/Tawlk/synt.git@570cfcdedbc9734489ee737eb5f95de73a494ab6#egg=synt-dev
-e git+https://github.com/Tawlk/tawlk.git@bd420f7a4cc33a58d3d3ecf9342ab650dd810b5e#egg=tawlk-dev
tornado==2.4.1
urlgrabber==3.9.1
virtualenv==1.8.4
virtualenv-clone==0.2.4
virtualenvwrapper==3.6
wsgiref==0.1.2
yolk==0.4.3
yum-langpacks==0.2.2
yum-metadata-parser==1.1.4
yum-presto==0.4.4

Thanks,

vks
  • 6,649
  • 7
  • 36
  • 55

3 Answers3

1

I would comment if I had enough reputation points.

error: Could not find required distribution python-redis-log>=9999

This suggests it is trying to satisfy a requirement for python-redis-log with a version of at least 9999. The current version installed is 0.1.2.

Please paste the 'requires' part of your setup.py or anywhere where dependencies are defined.

myanimal
  • 3,580
  • 26
  • 26
  • install_requires=[ 'flask', 'gitpython', 'gevent', 'gevent-websocket', 'simplejson', 'kral', 'synt', 'skor', 'rauth', 'python-redis-log>=9999', 'tornado', 'sockjs-tornado', ], – vks Dec 14 '12 at 10:25
  • Yes, the problem is there: `python-redis-log>=9999`. Remove the `>=9999` and it should work. – myanimal Dec 14 '12 at 14:37
1

I always suggest the use of virtualenv if you want to maintain a clean Python environment and not deal with conflicts all the time. The program allows you to create a separate Python environment to which you can install packages and not have them conflict with ones included on your distro.

This probably won't resolve your >=9999 probably, but it is a good tool to know about. I suggest you try making a virtualenv and see if you get the same problem.

1

The issue is that setuptools is looking for the required packages with at least the version number specified. 9999 is greater than 2.7.2, so it tries to download the version specified in the setup.py file.

The official documentation for the install_requires keyword is here

The simplest way to include requirement specifiers is to use the install_requires argument to setup(). It takes a string or list of strings containing requirement specifiers. If you include more than one requirement in a string, each requirement must begin on a new line.

A requirement specifier is described here:

setuptools and pkg_resources use a common syntax for specifying a project’s required dependencies. This syntax consists of a project’s PyPI name, optionally followed by a comma-separated list of “extras” in square brackets, optionally followed by a comma-separated list of version specifiers. A version specifier is one of the operators <, >, <=, >=, == or !=, followed by a version identifier. Tokens may be separated by whitespace, but any whitespace or nonstandard characters within a project name or version identifier must be replaced with -.

To solve your problem in particular:

Your setup.py file has

install_requires = [ ...
                     'python-redis-log>=9999'

The version specifier you have is python-redis-log>=9999, so your project is asking for a version number of python-redis-log that is 9999 or greater.

If you change that line to

python-redis-log>=0.1.2

That should fix the problem.

munk
  • 12,340
  • 8
  • 51
  • 71
  • Thank you for your answer,Now i got this error Searching for gevent Reading http://pypi.python.org/simple/gevent/ Reading http://www.gevent.org/ Reading http://gevent.org/ Best match: gevent 0.13.8 Downloading http://pypi.python.org/packages/source/g/gevent/gevent-0.13.8.tar.gz#md5=ca9dcaa7880762d8ebbc266b11252960 Processing gevent-0.13.8.tar.gz Running gevent-0.13.8/setup.py -q bdist_egg --dist-dir /tmp/easy_install-UrPhdg/gevent-0.13.8/egg-dist-tmp-ZvKB9y In file included from gevent/core.c:253:0: gevent/libevent.h:9:19: fatal error: event.h: No such file or directory compilation terminated. – vks Dec 17 '12 at 04:46
  • You're most likely missing a library. (This question)[http://stackoverflow.com/questions/7630388/how-can-i-install-python-library-gevent-on-mac-osx-lion] tells me you are probably missing libevent. You will need to install that first. – munk Dec 17 '12 at 15:17