Python - 导入新模块时出现问题 - libgmail

发布于 2024-09-01 12:35:30 字数 649 浏览 3 评论 0原文

我从sourceforge下载了Python模块 libgmail 并提取了档案。存档中有 setup.py,所以我在命令提示符下转到该目录,并

setup.py install 

收到以下错误消息

I:\libgmail-0.1.11>setup.py install
Traceback (most recent call last):
  File "I:\libgmail-0.1.11\setup.py", line 7, in ?
    import libgmail
  File "I:\libgmail-0.1.11\libgmail.py", line 36, in ?
    import mechanize as ClientCookie
ImportError: No module named mechanize

这可能很简单,但我是 python 新手。所以请指导该怎么做。

请注意,我使用的是 python 2.4 并使用 Windows-XP。

谢谢

微内核

I downloaded Python module libgmail from sourceforge and extracted all the files in the archive. The archive had setup.py, so I went to that directory in command prompt and did

setup.py install 

I am getting the following error message

I:\libgmail-0.1.11>setup.py install
Traceback (most recent call last):
  File "I:\libgmail-0.1.11\setup.py", line 7, in ?
    import libgmail
  File "I:\libgmail-0.1.11\libgmail.py", line 36, in ?
    import mechanize as ClientCookie
ImportError: No module named mechanize

This may be trivial, but I am new to python. So plz guide what to do.

please note, I am using python 2.4 and using Windows-XP.

Thank you

MicroKernel

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(3

烈酒灼喉 2024-09-08 12:35:30

我认为这个库取决于这个:

http://wwwsearch.sourceforge.net/mechanize/

首先尝试安装它。

I think this lib depends on this one:

http://wwwsearch.sourceforge.net/mechanize/

Try installing it first.

唱一曲作罢 2024-09-08 12:35:30

您需要下载并安装名为 mechanize 的模块。根据您的操作系统(即 Linux),您的包管理器可能有一些相关的东西,否则您将需要谷歌它,并按照它的安装说明进行操作。

You need to download and install the module called mechanize. Depending on your operating system (ie. Linux), your package manager probably has something for this, otherwise you will need to google it, and follow it's installation instructions.

寂寞花火° 2024-09-08 12:35:30

easy_install mechanize

如果这不起作用,您需要修复 PATH 环境变量以包含 python 安装目录\scripts 的路径。 easy_install 将来会为您节省大量时间。

PS:Python 2.4 已经有 6 岁了,你真的应该至少考虑一下 2.6。

easy_install mechanize

If this doesn't work, you need to fix your PATH environment variable to include path to your python installation directory\scripts. easy_install will save you a lot of time in future.

P.S.: Python 2.4 is 6 years old, you should really consider at least 2.6.

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