2011-12-28 127 views
1

我想使用lxml python庫。我與PIP工具把它安裝python2.7無法導入名稱objectify

pip install lxml 

當我打開蟒蛇shell解釋和寫入

>>> from lxml import objectify 
Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
ImportError: cannot import name objectify 

此異常。我也嘗試安裝舊版本3.2,2.2.8,但同樣的問題上升。不知道該怎麼辦

回答

1

使用的easy_install

easy_install lxml

>>> from lxml import objectify

0

從PyCharm您可以安裝LXML 3.4.2和它的作品。