gpt4 book ai didi

python - activestate pythonwin 缺少导入模块?

转载 作者:行者123 更新时间:2023-12-01 06:19:10 26 4
gpt4 key购买 nike

我正在 DiveIntoPython.com 上工作,但在导入工作时遇到问题。我已经在 windows xp prof 环境中安装了 ActiveState 的 Pythonwin。

在网站上,有一个练习涉及“导入odbchelper”和odbchelper。名称

http://www.diveintopython.org/getting_to_know_python/testing_modules.html

当我以交互方式运行它时,我得到:

>>> import odbchelper
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
ImportError: No module named odbchelper
>>> odbchelper.__name__
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
NameError: name 'odbchelper' is not defined

我猜测要么是我没有正确设置路径,要么是当我运行“sys.path”时,其中一个文件夹中不存在引用的模块。有什么想法吗?

提前致谢

最佳答案

这个模块肯定不是用Python2.6打包的(刚刚在我的机器上尝试过)。您是否尝试过用谷歌搜索该模块可能在哪里?

考虑这个post .

关于python - activestate pythonwin 缺少导入模块?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1583947/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com