【发布时间】:2014-06-13 18:54:20
【问题描述】:
我使用 pip 安装了 twill,另一个尝试使用 easy_install,我想在 Powershell 中使用它。关注此页面 - http://twill.idyll.org/ 我想玩弄它。
要开始使用 twill,请安装它,然后键入 twill-sh。在提示符处输入:
去http://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
如何只加载模块,以便在不编写脚本的情况下使用它们?
【问题讨论】:
-
你的问题不清楚。
-
PowerShell 与 Python 无关。可以使用PowerShell启动
python.exe,但这与使用cmd.exe启动没有区别。 -
消除该错误的第一步是安装 lxml :lxml.de/installation.html#ms-windows
标签: python python-2.7 twill