Werkzeug 不包含 wsgi 模块

发布于 2024-12-17 20:36:49 字数 842 浏览 2 评论 0原文

我正在尝试在当前成功运行 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.5werkzeug 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

み格子的夏天 2024-12-24 20:36:49

不幸的是,Aptitude 对于 Python 包来说常常已经过时了,就像在这里一样。最好使用 Python 的包管理工具 pip。 Pip 告诉我 werkzeug 目前版本为 0.8.1

首先安装 pip(如果您还没有),

sudo easy_install pip

然后安装 werkzeug

sudo pip install 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 version 0.8.1!

First install pip (if you don't have it already)

sudo easy_install pip

Then install werkzeug

sudo pip 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!

孤千羽 2024-12-24 20:36:49

我终于在Werkzeug文档中找到了答案。 easy_install 似乎是从其他地方获取的:

sudo easy_install Werkzeug

I finally found the answer in the Werkzeug documentation. easy_install seems to get it from somewhere else:

sudo easy_install Werkzeug
浮生未歇 2024-12-24 20:36:49

就我而言,我可以在完成所有这些操作后解决它:

1- pip install -r requeriments.txt
2- pip3 install -r requeriments.txt
3- sudo pip3 install -r requeriments.txt
4- python -m pip install -r requirements.txt
5- sudo python3 -m pip install -r requirements.txt
6- cd /usr/bin/local and check the available version of python, then
     . /usr/local/bin/python3.7 -m pip install -r requirements.txt
     . sudo /usr/local/bin/python3.7 -m pip install -r requirements.txt

结论是原因是要使用的 python 版本的同步。

In my case I could solve it after doing all this:

1- pip install -r requeriments.txt
2- pip3 install -r requeriments.txt
3- sudo pip3 install -r requeriments.txt
4- python -m pip install -r requirements.txt
5- sudo python3 -m pip install -r requirements.txt
6- cd /usr/bin/local and check the available version of python, then
     . /usr/local/bin/python3.7 -m pip install -r requirements.txt
     . sudo /usr/local/bin/python3.7 -m pip install -r requirements.txt

Concluding that the reason is the synchronization of the python version to be used.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文