我正在尝试将我的python项目设置到我本地的fedora16机器上,我已经使用git克隆了整个项目。
项目使用的是redis服务器。
在我输入命令python setup.py develop之后,我得到了以下错误
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我已经安装了redis 2.7
有人知道这里的问题是什么吗?非常感谢您的帮助。
PIP冻结
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谢谢,
发布于 2012-12-16 01:26:01
问题是setuptools正在查找至少具有指定版本号的所需包。9999大于2.7.2,因此它会尝试下载setup.py文件中指定的版本。
install_requires关键字的官方文档是
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.
这里描述了一个需求说明符:
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 -.
解决你的问题的:
您的setup.py文件具有
install_requires = [ ...
'python-redis-log>=9999'您拥有的版本说明符是python-redis-log>=9999,因此您的项目要求提供9999或更高的版本号python-redis-log。
如果将该行更改为
python-redis-log>=0.1.2这应该可以解决这个问题。
发布于 2012-12-14 17:23:07
如果我有足够的名誉点,我会评论的。
error: Could not find required distribution python-redis-log>=9999
这表明它正试图用至少一个9999版本来满足对python-redis-log的要求。当前安装的版本是0.1.2。
请粘贴setup.py的“requires”部分,或粘贴到定义了依赖项的任何位置。
发布于 2012-12-16 01:04:09
如果你想维护一个干净的virtualenv环境,而不想一直处理冲突,我总是建议你使用Python。该程序允许您创建一个单独的Python环境,您可以在该环境中安装软件包,并且不会与发行版中包含的软件包发生冲突。
这可能不会解析您的>=9999,但它是一个值得了解的好工具。我建议你试着做一个虚拟环境,看看你是否遇到了同样的问题。
https://stackoverflow.com/questions/13817946
复制相似问题