我正在尝试安装一个应用程序(在Fedora上),这个应用程序是我们的web开发团队的另一名成员。我设法在我的虚拟环境中配置了几乎所有我需要的东西,但是当我尝试shell命令时:
python setup.py install
它指向更新版本的Pylons,我收到错误:
error: Installed distribution Pylons 0.9.7 conflicts with requirement Pylons==0.10
我已使用pip uninstall
卸载了此虚拟环境版本的挂架并重新安装了正确的版本。我通过使用:
python
Python 2.6 (r26:66714, Mar 15 2012, 10:33:52)
[GCC 4.6.1 20110908 (Red Hat 4.6.1-9)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pylons
>>> pylons.__version__
'0.10'
>>>
所以它看起来好像还在使用主系统版本的挂架?该程序确实使用了一些公司中间件,我尝试卸载并重新安装,但堆栈跟踪并不表示这样的错误。
以下是堆栈跟踪的其余部分:
[~/workspace/PYTHON/shipping] python setup.py install
running install
running bdist_egg
running egg_info
writing requirements to shipping.egg-info/requires.txt
writing shipping.egg-info/PKG-INFO
writing top-level names to shipping.egg-info/top_level.txt
writing dependency_links to shipping.egg-info/dependency_links.txt
writing entry points to shipping.egg-info/entry_points.txt
writing paster_plugins to shipping.egg-info/paster_plugins.txt
reading manifest template 'MANIFEST.in'
writing manifest file 'shipping.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-i686/egg
running install_lib
running build_py
creating build/bdist.linux-i686/egg
creating build/bdist.linux-i686/egg/shipping
creating build/bdist.linux-i686/egg/shipping/controllers
copying build/lib/shipping/controllers/recipients.py -> build/bdist.linux-i686/egg/shipping/controllers
copying build/lib/shipping/controllers/error.py -> build/bdist.linux-i686/egg/shipping/controllers
copying build/lib/shipping/controllers/forms.py -> build/bdist.linux-i686/egg/shipping/controllers
copying build/lib/shipping/controllers/security.py -> build/bdist.linux-i686/egg/shipping/controllers
copying build/lib/shipping/controllers/pallets.py -> build/bdist.linux-i686/egg/shipping/controllers
copying build/lib/shipping/controllers/licences.py -> build/bdist.linux-i686/egg/shipping/controllers
copying build/lib/shipping/controllers/items.py -> build/bdist.linux-i686/egg/shipping/controllers
copying build/lib/shipping/controllers/resources.py -> build/bdist.linux-i686/egg/shipping/controllers
copying build/lib/shipping/controllers/descriptions.py -> build/bdist.linux-i686/egg/shipping/controllers
copying build/lib/shipping/controllers/__init__.py -> build/bdist.linux-i686/egg/shipping/controllers
copying build/lib/shipping/controllers/validators.py -> build/bdist.linux-i686/egg/shipping/controllers
creating build/bdist.linux-i686/egg/shipping/tests
copying build/lib/shipping/tests/test_models.py -> build/bdist.linux-i686/egg/shipping/tests
creating build/bdist.linux-i686/egg/shipping/tests/functional
copying build/lib/shipping/tests/functional/test_forms.py -> build/bdist.linux-i686/egg/shipping/tests/functional
copying build/lib/shipping/tests/functional/test_items.py -> build/bdist.linux-i686/egg/shipping/tests/functional
copying build/lib/shipping/tests/functional/test_descriptions.py -> build/bdist.linux-i686/egg/shipping/tests/functional
copying build/lib/shipping/tests/functional/test_licences.py -> build/bdist.linux-i686/egg/shipping/tests/functional
copying build/lib/shipping/tests/functional/test_item.py -> build/bdist.linux-i686/egg/shipping/tests/functional
copying build/lib/shipping/tests/functional/__init__.py -> build/bdist.linux-i686/egg/shipping/tests/functional
copying build/lib/shipping/tests/functional/test_shipform.py -> build/bdist.linux-i686/egg/shipping/tests/functional
copying build/lib/shipping/tests/functional/test_pallets.py -> build/bdist.linux-i686/egg/shipping/tests/functional
copying build/lib/shipping/tests/__init__.py -> build/bdist.linux-i686/egg/shipping/tests
creating build/bdist.linux-i686/egg/shipping/lib
copying build/lib/shipping/lib/__init__.py -> build/bdist.linux-i686/egg/shipping/lib
copying build/lib/shipping/lib/helpers.py -> build/bdist.linux-i686/egg/shipping/lib
copying build/lib/shipping/lib/base.py -> build/bdist.linux-i686/egg/shipping/lib
copying build/lib/shipping/lib/app_globals.py -> build/bdist.linux-i686/egg/shipping/lib
creating build/bdist.linux-i686/egg/shipping/templates
copying build/lib/shipping/templates/view.html -> build/bdist.linux-i686/egg/shipping/templates
creating build/bdist.linux-i686/egg/shipping/templates/management
copying build/lib/shipping/templates/management/shippingFormTabs.htm -> build/bdist.linux-i686/egg/shipping/templates/management
creating build/bdist.linux-i686/egg/shipping/templates/includes
copying build/lib/shipping/templates/includes/itemform.html -> build/bdist.linux-i686/egg/shipping/templates/includes
copying build/lib/shipping/templates/includes/shippingform.html -> build/bdist.linux-i686/egg/shipping/templates/includes
copying build/lib/shipping/templates/includes/authorisationform.html -> build/bdist.linux-i686/egg/shipping/templates/includes
creating build/bdist.linux-i686/egg/shipping/templates/includes/printables
copying build/lib/shipping/templates/includes/printables/shippinginstructions.html -> build/bdist.linux-i686/egg/shipping/templates/includes/printables
copying build/lib/shipping/templates/includes/printables/proformainvoice.html -> build/bdist.linux-i686/egg/shipping/templates/includes/printables
copying build/lib/shipping/templates/includes/printables/collectionnote.html -> build/bdist.linux-i686/egg/shipping/templates/includes/printables
copying build/lib/shipping/templates/includes/printables/hcletter.html -> build/bdist.linux-i686/egg/shipping/templates/includes/printables
copying build/lib/shipping/templates/includes/printables/packinglist.html -> build/bdist.linux-i686/egg/shipping/templates/includes/printables
copying build/lib/shipping/templates/includes/printables/base.html -> build/bdist.linux-i686/egg/shipping/templates/includes/printables
copying build/lib/shipping/templates/includes/recipientform.html -> build/bdist.linux-i686/egg/shipping/templates/includes
creating build/bdist.linux-i686/egg/shipping/templates/reports
creating build/bdist.linux-i686/egg/shipping/templates/reports/resources
copying build/lib/shipping/templates/reports/resources/GOTHICI.TTF -> build/bdist.linux-i686/egg/shipping/templates/reports/resources
copying build/lib/shipping/templates/reports/resources/report.css -> build/bdist.linux-i686/egg/shipping/templates/reports/resources
copying build/lib/shipping/templates/reports/resources/GOTHICB.TTF -> build/bdist.linux-i686/egg/shipping/templates/reports/resources
copying build/lib/shipping/templates/reports/resources/letterhead.pdf -> build/bdist.linux-i686/egg/shipping/templates/reports/resources
copying build/lib/shipping/templates/reports/resources/GOTHIC.TTF -> build/bdist.linux-i686/egg/shipping/templates/reports/resources
copying build/lib/shipping/templates/reports/resources/GOTHICBI.TTF -> build/bdist.linux-i686/egg/shipping/templates/reports/resources
copying build/lib/shipping/templates/reports/base.mako -> build/bdist.linux-i686/egg/shipping/templates/reports
copying build/lib/shipping/templates/reports/shipping_instructions.mako -> build/bdist.linux-i686/egg/shipping/templates/reports
creating build/bdist.linux-i686/egg/shipping/config
copying build/lib/shipping/config/middleware.py -> build/bdist.linux-i686/egg/shipping/config
copying build/lib/shipping/config/routing.py -> build/bdist.linux-i686/egg/shipping/config
copying build/lib/shipping/config/environment.py -> build/bdist.linux-i686/egg/shipping/config
copying build/lib/shipping/config/__init__.py -> build/bdist.linux-i686/egg/shipping/config
copying build/lib/shipping/config/deployment.ini_tmpl -> build/bdist.linux-i686/egg/shipping/config
copying build/lib/shipping/websetup.py -> build/bdist.linux-i686/egg/shipping
copying build/lib/shipping/__init__.py -> build/bdist.linux-i686/egg/shipping
creating build/bdist.linux-i686/egg/shipping/model
copying build/lib/shipping/model/workflow.py -> build/bdist.linux-i686/egg/shipping/model
copying build/lib/shipping/model/permission.py -> build/bdist.linux-i686/egg/shipping/model
copying build/lib/shipping/model/definitions.py -> build/bdist.linux-i686/egg/shipping/model
copying build/lib/shipping/model/__init__.py -> build/bdist.linux-i686/egg/shipping/model
copying build/lib/shipping/model/meta.py -> build/bdist.linux-i686/egg/shipping/model
creating build/bdist.linux-i686/egg/shipping/public
copying build/lib/shipping/public/pylons-logo.gif -> build/bdist.linux-i686/egg/shipping/public
copying build/lib/shipping/public/Thumbs.db -> build/bdist.linux-i686/egg/shipping/public
creating build/bdist.linux-i686/egg/shipping/public/inmarsat_scripts
copying build/lib/shipping/public/inmarsat_scripts/script.js -> build/bdist.linux-i686/egg/shipping/public/inmarsat_scripts
copying build/lib/shipping/public/inmarsat_scripts/shipping.js -> build/bdist.linux-i686/egg/shipping/public/inmarsat_scripts
copying build/lib/shipping/public/inmarsat_scripts/components.js -> build/bdist.linux-i686/egg/shipping/public/inmarsat_scripts
copying build/lib/shipping/public/favicon.ico -> build/bdist.linux-i686/egg/shipping/public
creating build/bdist.linux-i686/egg/shipping/public/style_sheets
copying build/lib/shipping/public/style_sheets/componentsPage.css -> build/bdist.linux-i686/egg/shipping/public/style_sheets
copying build/lib/shipping/public/style_sheets/jquery-ui-1.7.2.custom.css -> build/bdist.linux-i686/egg/shipping/public/style_sheets
copying build/lib/shipping/public/style_sheets/requestsView.css -> build/bdist.linux-i686/egg/shipping/public/style_sheets
copying build/lib/shipping/public/style_sheets/components_IE.css -> build/bdist.linux-i686/egg/shipping/public/style_sheets
copying build/lib/shipping/public/style_sheets/shippingForm_Temp.css -> build/bdist.linux-i686/egg/shipping/public/style_sheets
copying build/lib/shipping/public/style_sheets/base.css -> build/bdist.linux-i686/egg/shipping/public/style_sheets
copying build/lib/shipping/public/style_sheets/ui.all.css -> build/bdist.linux-i686/egg/shipping/public/style_sheets
copying build/lib/shipping/public/style_sheets/highlight.css -> build/bdist.linux-i686/egg/shipping/public/style_sheets
copying build/lib/shipping/public/style_sheets/ie.css -> build/bdist.linux-i686/egg/shipping/public/style_sheets
copying build/lib/shipping/public/style_sheets/shippingForm.css -> build/bdist.linux-i686/egg/shipping/public/style_sheets
copying build/lib/shipping/public/style_sheets/components.css -> build/bdist.linux-i686/egg/shipping/public/style_sheets
copying build/lib/shipping/public/style_sheets/shippingForm_final.css -> build/bdist.linux-i686/egg/shipping/public/style_sheets
copying build/lib/shipping/public/bg.png -> build/bdist.linux-i686/egg/shipping/public
byte-compiling build/bdist.linux-i686/egg/shipping/controllers/recipients.py to recipients.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/controllers/error.py to error.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/controllers/forms.py to forms.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/controllers/security.py to security.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/controllers/pallets.py to pallets.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/controllers/licences.py to licences.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/controllers/items.py to items.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/controllers/resources.py to resources.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/controllers/descriptions.py to descriptions.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/controllers/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/controllers/validators.py to validators.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/tests/test_models.py to test_models.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/tests/functional/test_forms.py to test_forms.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/tests/functional/test_items.py to test_items.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/tests/functional/test_descriptions.py to test_descriptions.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/tests/functional/test_licences.py to test_licences.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/tests/functional/test_item.py to test_item.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/tests/functional/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/tests/functional/test_shipform.py to test_shipform.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/tests/functional/test_pallets.py to test_pallets.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/tests/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/lib/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/lib/helpers.py to helpers.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/lib/base.py to base.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/lib/app_globals.py to app_globals.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/config/middleware.py to middleware.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/config/routing.py to routing.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/config/environment.py to environment.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/config/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/websetup.py to websetup.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/model/workflow.py to workflow.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/model/permission.py to permission.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/model/definitions.py to definitions.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/model/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-i686/egg/shipping/model/meta.py to meta.pyc
creating build/bdist.linux-i686/egg/EGG-INFO
copying shipping.egg-info/PKG-INFO -> build/bdist.linux-i686/egg/EGG-INFO
copying shipping.egg-info/SOURCES.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying shipping.egg-info/dependency_links.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying shipping.egg-info/entry_points.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying shipping.egg-info/not-zip-safe -> build/bdist.linux-i686/egg/EGG-INFO
copying shipping.egg-info/paster_plugins.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying shipping.egg-info/requires.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying shipping.egg-info/top_level.txt -> build/bdist.linux-i686/egg/EGG-INFO
creating 'dist/shipping-1.0.0dev_r2476-py2.6.egg' and adding 'build/bdist.linux-i686/egg' to it
removing 'build/bdist.linux-i686/egg' (and everything under it)
Processing shipping-1.0.0dev_r2476-py2.6.egg
removing '/home/aaron/workspace/shipenv/lib/python2.6/site-packages/shipping-1.0.0dev_r2476-py2.6.egg' (and everything under it)
creating /home/aaron/workspace/shipenv/lib/python2.6/site-packages/shipping-1.0.0dev_r2476-py2.6.egg
Extracting shipping-1.0.0dev_r2476-py2.6.egg to /home/aaron/workspace/shipenv/lib/python2.6/site-packages
Adding shipping 1.0.0dev-r2476 to easy-install.pth file
Installed /home/aaron/workspace/shipenv/lib/python2.6/site-packages/shipping-1.0.0dev_r2476-py2.6.egg
Processing dependencies for shipping==1.0.0dev-r2476
error: Installed distribution Pylons 0.9.7 conflicts with requirement Pylons==0.10
(shipenv)
我注意到在堆栈跟踪中,当我尝试安装它时,它一直在下载和安装Pylons 0.9.7,因为setup.py文件中的要求是Pylons == 0.9.7
但是这并没有解释冲突!
我设法通过更改这里的要求来安装应用程序,但后来我得到了一个不同的Pylons错误(可能是因为它已过时)
修改
看起来正在安装0.9.7,因为它是依赖项要求的一部分。
答案 0 :(得分:1)
您是否使用--no-site-packages开关创建了virtualenv?
答案 1 :(得分:0)
你还记得激活virtualenv吗?
source virtenv/bin/activate
运行安装之前
编辑你也可以尝试将os.environ ['PYTHON_EGG_CACHE']设置为virtenv / lib / site-packages
答案 2 :(得分:0)
搜索Pylons 0.9.7文件并检查$ PATH。可能有一个版本的Pylons 0.9.7安装在脚本所指的其他地方。