Werkzeug 不包含 wsgi 模块
我正在尝试在当前成功运行 5.0 分支的开发环境中运行 OpenERP 6.1 分支。我正在 Ubuntu 10.04 Lucid Lynx 上运行。
我已经克服了一些障碍,但目前遇到了由 http
模块中的 import werkzeug.wsgi
引起的错误。我添加了 python-werkzeug
包,但它不包含 wsgi
模块。我查看了 软件包的网页,我发现我的 Ubuntu 版本变得 werkzeug 0.5.1,而较新的都至少有 0.6.2。当我比较 werkzeug 0.5 和 werkzeug 0.6,我可以看到 wsgi
在这些版本之间添加了模块。
如何才能在 Ubuntu 10.04 上运行至少 0.6 版的 werkzeug?这表明我已经得到了最新的:
sudo apt-get install python-werkzeug
I'm trying to run the 6.1 branch of OpenERP in my development environment that is currently running the 5.0 branch successfully. I'm running on Ubuntu 10.04 Lucid Lynx.
I've gotten past a few hurdles, but I'm currently stuck on an error caused by import werkzeug.wsgi
in the http
module. I added the python-werkzeug
package, but it doesn't include the wsgi
module. I looked on the package's web page, and I see that my version of Ubuntu gets werkzeug 0.5.1, when the newer ones all have at least 0.6.2. When I compare the source for werkzeug 0.5 and werkzeug 0.6, I can see that the wsgi
module was added between those versions.
How can I get at least version 0.6 of werkzeug running on Ubuntu 10.04? This says I've already got the latest:
sudo apt-get install python-werkzeug
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
不幸的是,Aptitude 对于 Python 包来说常常已经过时了,就像在这里一样。最好使用 Python 的包管理工具
pip
。 Pip 告诉我 werkzeug 目前版本为0.8.1
!首先安装 pip(如果您还没有),
然后安装 werkzeug
简单安装不再是推荐的 Python 打包方式 - 您当然应该使用
pip
。这些命令将包安装到计算机的全局 Python 环境中。您最好研究一下
virtualenv
,它创建可以安装自己的包的单独 Python 解释器。祝你好运!
Aptitude is often woefully out of date for Python packages, as it seems to be here. You are much better off using
pip
, Python's package management tool. Pip tells me that werkzeug is currently at version0.8.1
!First install pip (if you don't have it already)
Then install werkzeug
Easy install is no longer the recommended way to do Python package - you should certainly be using
pip
.These commands install the packages into your machine's global Python environment. You would do well to investigate
virtualenv
, which creates separate Python interpreters that can have their own packages installed.Good luck!
我终于在Werkzeug文档中找到了答案。
easy_install
似乎是从其他地方获取的:I finally found the answer in the Werkzeug documentation.
easy_install
seems to get it from somewhere else:安装http://security。 ubuntu.com/ubuntu/pool/main/p/python-werkzeug/python-werkzeug_0.6.2-1_all.deb 这为我解决了问题
Installed http://security.ubuntu.com/ubuntu/pool/main/p/python-werkzeug/python-werkzeug_0.6.2-1_all.deb and this solved the problem for me
就我而言,我可以在完成所有这些操作后解决它:
结论是原因是要使用的 python 版本的同步。
In my case I could solve it after doing all this:
Concluding that the reason is the synchronization of the python version to be used.