我已經安裝了python3的機械化庫。 https://github.com/adevore/mechanize/tree/python3導入python3的機械化分支時出現錯誤
但是,當我導入它,我得到這個錯誤。
Python 3.3.3 (default, Dec 30 2013, 16:15:14)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import mechanize
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/Username/.virtualenvs/python3/lib/python3.3/site-packages/mechanize-0.2.6.dev_20140305-py3.3.egg/mechanize/__init__.py", line 122, in <module>
File "/Users/Username/.virtualenvs/python3/lib/python3.3/site-packages/mechanize-0.2.6.dev_20140305-py3.3.egg/mechanize/_mechanize.py", line 15, in <module>
File "/Users/Username/.virtualenvs/python3/lib/python3.3/site-packages/mechanize-0.2.6.dev_20140305-py3.3.egg/mechanize/_html.py", line 16, in <module>
ImportError: cannot import name _sgmllib_copy
但是,我確定機械化安裝在同一個virtualenv目錄中。
$ pip freeze
## FIXME: could not find svn URL in dependency_links for this package:
mechanize==0.2.6.dev-20140305
pyquery==1.2.8
Warning: cannot find svn location for mechanize==0.2.6.dev-20140305
我不習慣在終端操作,所以我不知道如何解決這個問題。
任何人都可以請幫我解決這個問題嗎?
預先感謝您!
你有沒有機會去使用Python 3? –