Python安裝BeautifulSoup后輸入from bs4 import BeautifulSoup
出現
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/xhd/Templates/beautifulsoup4-4.2.0/bs4/__init__.py", line 365
print soup.prettify()
^
SyntaxError: invalid syntax
Python3.4版本
uj5u.com熱心網友回復:
解決了嗎?我也遇見了這個問題
uj5u.com熱心網友回復:
雖然我也不知道咋回事,但是我把from bs4,,,,放第一行就好了,uj5u.com熱心網友回復:
我就在cmd直接 pip install beautifusoup4 安裝的接著在python 自帶的idle 上匯入from bs4 import BeautifulSoup 然后出現
====RESTART: Shell====
這是怎么回事呢
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/128471.html
標籤:應用程序開發區
上一篇:Linux
