我使用pip安装了twill,另一次尝试使用easy_install,我想在Powershell中使用它。遵循这个页面- http://twill.idyll.org/,我想尝试一下它。
要开始使用twill,请安装它,然后输入twill-sh。在提示符下键入:
go http://www.slashdot.org/ show showhttp://www.slashdot.org/
当我键入twill-sh时,它不起作用。我在power shell中输入了它,在加载python之后尝试了它,在使用import twill并尝试它之后又尝试了它。我只得到错误。
Traceback (most recent call last):
File "C:\Python27\Scripts\twill-sh-script.py", line 9, in <module>
load_entry_point('twill==1.8.0', 'console_scripts', 'twill-sh')()
File "build\bdist.win32\egg\pkg_resources.py", line 356, in load_entry_point
File "build\bdist.win32\egg\pkg_resources.py", line 2439, in load_entry_point
File "build\bdist.win32\egg\pkg_resources.py", line 2155, in load
File "C:\Python27\lib\site-packages\twill\__init__.py", line 52, in <module>
from shell import TwillCommandLoop
File "C:\Python27\lib\site-packages\twill\shell.py", line 9, in <module>
from twill import commands, parse, __version__
File "C:\Python27\lib\site-packages\twill\commands.py", line 7, in <module>
from lxml import html我如何加载模块,这样我就可以在不编写脚本的情况下使用它们?
发布于 2014-12-18 22:29:01
我也有同样的问题。再往下看日志,我发现了以下内容:
File "C:\Anaconda\lib\site-packages\lxml\cssselect.py", line 18, in <module> raise ImportError('cssselect seems not to be installed. '
ImportError: cssselect seems not to be installed. See http://packages.python.org/cssselect/我通过安装cssselect包修复了这个问题(使用conda,因为我已经安装了Anaconda,pip也应该这样做)。
conda install cssselecthttps://stackoverflow.com/questions/24212149
复制相似问题