gpt4 book ai didi

macos - Python - Mechanize - 导入失败(MacOS 10.7 上的 python 3.3)

转载 作者:行者123 更新时间:2023-12-04 16:22:03 26 4
gpt4 key购买 nike

使用 Python3.3 在 MacOS 10.7 上成功安装了 mechanize。

但是当我尝试时,我失败了。

>>> import mechanize
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/mechanize-0.2.5-py3.3.egg/mechanize/__init__.py", line 119, in <module>
ImportError: No module named '_version'
>>>

环境是这样的:
>>> print (sys.version)
3.3.5 (v3.3.5:62cf4e77f785, Mar 9 2014, 01:12:57)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]

>>> print(*sys.path, sep='\n')

/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/setuptools-3.1-py3.3.egg
/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/mechanize-0.2.5-py3.3.egg
/Library/Frameworks/Python.framework/Versions/3.3/lib/python33.zip
/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3
/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/plat-darwin
/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload
/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages
>>>

任何建议表示赞赏。

最佳答案

我在 Windows 7 上也有同样的问题。他们在这里说 http://wwwsearch.sourceforge.net/mechanize/documentation.html#compatibility
“Mechanize 适用于 Python 2.4、Python 2.5、Python 2.6 和 Python 2.7。”似乎不支持 3.3 版本。

关于macos - Python - Mechanize - 导入失败(MacOS 10.7 上的 python 3.3),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22410657/

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