我正在尝试将我的 python 项目设置到我本地的 fedora 16 机器上。我已经使用 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
有人知道这里的问题是什么吗?非常感谢您的帮助。
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
谢谢,
最佳答案
问题是 setuptools 正在寻找至少具有指定版本号的所需包。 9999 大于 2.7.2,因此它会尝试下载 setup.py 文件中指定的版本。
install_requires 关键字的官方文档是 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.
此处描述了需求说明符:
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 ,因此您的项目要求 python-redis-log 的版本号为 9999 或更高。
如果将该行更改为
python-redis-log>=0.1.2
这应该可以解决问题。
关于Python redis-log错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13817946/
大约一年前,我决定确保每个包含非唯一文本的Flash通知都将从模块中的方法中获取文本。我这样做的最初原因是为了避免一遍又一遍地输入相同的字符串。如果我想更改措辞,我可以在一个地方轻松完成,而且一遍又一遍地重复同一件事而出现拼写错误的可能性也会降低。我最终得到的是这样的:moduleMessagesdefformat_error_messages(errors)errors.map{|attribute,message|"Error:#{attribute.to_s.titleize}#{message}."}enddeferror_message_could_not_find(obje
我遵循MichaelHartl的“RubyonRails教程:学习Web开发”,并创建了检查用户名和电子邮件长度有效性的测试(名称最多50个字符,电子邮件最多255个字符)。test/helpers/application_helper_test.rb的内容是:require'test_helper'classApplicationHelperTest在运行bundleexecraketest时,所有测试都通过了,但我看到以下消息在最后被标记为错误:ERROR["test_full_title_helper",ApplicationHelperTest,1.820016791]test
我是rails的新手,想在form字段上应用验证。myviewsnew.html.erb.....模拟.rbclassSimulation{:in=>1..25,:message=>'Therowmustbebetween1and25'}end模拟Controller.rbclassSimulationsController我想检查模型类中row字段的整数范围,如果不在范围内则返回错误信息。我可以检查上面代码的范围,但无法返回错误消息提前致谢 最佳答案 关键是您使用的是模型表单,一种显示ActiveRecord模型实例属性的表单。c
我正在尝试编写一个将文件上传到AWS并公开该文件的Ruby脚本。我做了以下事情:s3=Aws::S3::Resource.new(credentials:Aws::Credentials.new(KEY,SECRET),region:'us-west-2')obj=s3.bucket('stg-db').object('key')obj.upload_file(filename)这似乎工作正常,除了该文件不是公开可用的,而且我无法获得它的公共(public)URL。但是当我登录到S3时,我可以正常查看我的文件。为了使其公开可用,我将最后一行更改为obj.upload_file(file
我克隆了一个rails仓库,我现在正尝试捆绑安装背景:OSXElCapitanruby2.2.3p173(2015-08-18修订版51636)[x86_64-darwin15]rails-v在您的Gemfile中列出的或native可用的任何gem源中找不到gem'pg(>=0)ruby'。运行bundleinstall以安装缺少的gem。bundleinstallFetchinggemmetadatafromhttps://rubygems.org/............Fetchingversionmetadatafromhttps://rubygems.org/...Fe
在Cooper的书BeginningRuby中,第166页有一个我无法重现的示例。classSongincludeComparableattr_accessor:lengthdef(other)@lengthother.lengthenddefinitialize(song_name,length)@song_name=song_name@length=lengthendenda=Song.new('Rockaroundtheclock',143)b=Song.new('BohemianRhapsody',544)c=Song.new('MinuteWaltz',60)a.betwee
我是Google云的新手,我正在尝试对其进行首次部署。我的第一个部署是RubyonRails项目。我基本上是在关注thisguideinthegoogleclouddocumentation.唯一的区别是我使用的是我自己的项目,而不是他们提供的“helloworld”项目。这是我的app.yaml文件runtime:customvm:trueentrypoint:bundleexecrackup-p8080-Eproductionconfig.ruresources:cpu:0.5memory_gb:1.3disk_size_gb:10当我转到我的项目目录并运行gcloudprevie
我有两个Rails模型,即Invoice和Invoice_details。一个Invoice_details属于Invoice,一个Invoice有多个Invoice_details。我无法使用accepts_nested_attributes_forinInvoice通过Invoice模型保存Invoice_details。我收到以下错误:(0.2ms)BEGIN(0.2ms)ROLLBACKCompleted422UnprocessableEntityin25ms(ActiveRecord:4.0ms)ActiveRecord::RecordInvalid(Validationfa
这个问题在这里已经有了答案:Arraysmisbehaving(1个回答)关闭6年前。是否应该这样,即我误解了,还是错误?a=Array.new(3,Array.new(3))a[1].fill('g')=>[["g","g","g"],["g","g","g"],["g","g","g"]]它不应该导致:=>[[nil,nil,nil],["g","g","g"],[nil,nil,nil]]
尝试在我的RoR应用程序中实现计数器缓存列时出现错误Unknownkey(s):counter_cache。我在这个问题中实现了模型关联:Modelassociationquestion这是我的迁移:classAddVideoVotesCountToVideos0Video.reset_column_informationVideo.find(:all).eachdo|p|p.update_attributes:videos_votes_count,p.video_votes.lengthendenddefself.downremove_column:videos,:video_vot