2016-11-04 12 views
2

「Harrison Python Web Programming」のPythonコースに従っていて、「RSSフィードのスクラッピング(3.4.2)」セクションに固執しています。 Harrison Python Web Programming RSSフィードを掻き集める(3.4.2)

私はBeautifulSoup4をインストール

は、正常にインストールするようだが、その後、私はコードを実行するとき、私は、このエラーに遭遇:私はネット上で周りを見て持っていた

Traceback (most recent call last): File "C:/Users/Owen/Desktop/Owen/Electronics/Code/Python Web Programming XML.py", line 6, in <module> xml= BeautifulSoup(req, 'xml') File "C:\Users\Owen\AppData\Local\Programs\Python\Python35-32\lib\site-packages\bs4\__init__.py", line 165, in __init__ % ",".join(features)) bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: xml. Do you need to install a parser library?

、とされています私はlxmlをインストールする必要があると言いました。しかし、私はこのエラーに遭遇します:

error: Unable to find vcvarsall.bat 

誰でも助けてくれますか?

+1

https://blogs.msdn.microsoft.com/pythonengineering/2016/04/11/unable-to-find-vcvarsall-bat/ – jinksPadlock

+0

'lxml'と'車輪を持って、同じエラーをまだ得ている。何をお勧めしますか? – MrMule

+0

lxmlには「非公式」のホイールがありますが、それを使用していますか? http://lxml.de/installation.htmlのMS Windowsセクションを確認してください。 – jinksPadlock

答えて

0

pipには、MS Visual C++コンパイラがインストールされていることが前提となっているため、おそらく"Error: Unable to find vcvarsall.bat"が表示されます。プリコンパイルされたホイールを使用して(私は間違っていない場合は、PIPはまた、あなたが魔法のようにもコンパイラの正しいバージョンを持っていることを前提としています。)

Futher reading

頻繁に動作します。しかし、lxmlのあたり:両方beautifulsoup4`

If you fail to build lxml on your MS Windows system from the signed and tested sources that we release, consider using the binary builds from PyPI or the unofficial Windows binaries that Christoph Gohlke generously provides.

関連する問題