Python:安装和使用 Exscript 模块 Windows x86

发布于 2024-11-30 09:11:48 字数 1463 浏览 0 评论 0原文

我一直在用头撞墙试图安装 Exscript。在多次手动尝试失败后,我安装了 ActivePython 并成功从 cmd 提示符运行“pypm install Exscript”。

我现在正在浏览 Exscript 文档(可在此处找到 https://github.com/ knipknap/exscript/wiki/Python-API-Tutorial),如果我运行第一个示例脚本,我会得到一个错误:

>>> from Exscript.util.interact import read_login

Traceback (most recent call last):
  File "<pyshell#6>", line 1, in <module>
    from Exscript.util.interact import read_login
ImportError: No module named interact

所以,我明白这是说没有模块交互。我怎样才能检查这个?有没有办法可以手动添加这个模块?我很想知道为什么这个模块没有随软件包一起提供,但这可能无法回答:)

非常感谢任何和所有帮助。谢谢

  • 编辑 -

import Exscript.util 有效,但如果我尝试 import Exscript.util.Interact 我收到错误。当我查看 util.py 时,我看到一个条目显示“from FooLib import Interact”。我首先认为这可能只是一个大写错误(Exscript.util.interact 与 util.Interact),但这些都不起作用。我不知道从这里去哪里...:(

  • 编辑 -

我已经在开发者论坛上发布了这个问题,希望他能为我们提供答案。 https://github.com/knipknap/exscript/issues/15

  • 编辑 -

开发人员建议我使用旧版本并告诉我下载最新版本。我一直在手动安装模块,所以我在谷歌上搜索了如何轻松安装 py 模块,我在 easy_install.exe 上找到了一篇文章,我运行了“c:\Python26>easy_install C:\Users\support\Desktop\lou\knipknap-exscript-”。 v2.1-70-gf5583f3.tar.gz”从cmd提示符中安装了模块(没有错误),现在当我运行脚本时它可以工作。

下一个挑战将是如何让这些脚本在未安装 Python 的用户计算机上作为独立的 exe 运行:)

谢谢大家的评论,我非常感谢你们的帮助。

I have been banging my head against the wall trying to get Exscript installed. After multiple failed attempts at doing it manually, I installed ActivePython and had success running "pypm install Exscript" from the cmd prompt.

I am now going through the Exscript documentation (found here https://github.com/knipknap/exscript/wiki/Python-API-Tutorial) and if I run the first example script I get an error:

>>> from Exscript.util.interact import read_login

Traceback (most recent call last):
  File "<pyshell#6>", line 1, in <module>
    from Exscript.util.interact import read_login
ImportError: No module named interact

So, I understand that this is saying that there is no module interact. How can I check this? Is there a way I can manually add this module? I would love to know WHY this module didnt come with the package, but that may be impossible to answer :)

Any and all help is greatly appreciated. Thank you

  • EDIT -

import Exscript.util works but if I try import Exscript.util.Interact I get the error. When I look in util.py I see an entry that says "from FooLib import Interact". I first thought it may just be a capitalization error (Exscript.util.interact vs util.Interact) but neither of those work. I am not sure where to go from here... :(

  • EDIT -

I have posted this question on the developers forums, hopefully he will have an answer for us. https://github.com/knipknap/exscript/issues/15

  • EDIT -

The developer suggested that I was using an old version and told me to download the latest. I had struggled installing the module manually so I googled how to easily install py modules. I found a writeup on easy_install.exe. I ran "c:\Python26>easy_install C:\Users\support\Desktop\lou\knipknap-exscript-v2.1-70-gf5583f3.tar.gz" from the cmd prompt, the module was installed (no errors) and now when i run the script it works.

Next challenge will be how to get these scripts to run as stand-alone exe's on users computers without Python installed :)

THANK YOU to everyone to commented I truely appreciate your help.

Lou

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

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

发布评论

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

评论(1

惟欲睡 2024-12-07 09:11:48

包安装的一种常见方式是作为目录。因此,请检查您的 site-packages 目录中是否有 Exscript 目录,其中应该有一个 util 目录,并且其中应该有一个interact.py 文件。查找类似的拼写,以防教程拼写错误。

One common way packages are installed is as directories. So check your site-packages directory for an Exscript directory, and inside that there should be a util directory, and inside that there should be an interact.py file. Look for similar spellings in case the tutorial misspelled something.

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