[問題] python 3.5 beautifulsoup('lxml')疑問

看板Python作者 (寶包)時間7年前 (2016/09/23 18:16), 編輯推噓3(304)
留言7則, 6人參與, 最新討論串1/1
最近學習BeautifulSoup的功能 雖然用內建的html.parser去爬蟲多數可以成功. 但如果用 soup = BeautifulSoup(html, "lxml")指令 都會跳出 bs4.feature not found , couldn't find a tree builder with the features you requested : lxml . Do you need to install a parser library? 我的電腦是windows7 ,python是3.5版的 網路上的教學不外乎是藉安裝lxml 或是 visual studio解決問題 我都已經安裝過,但還是會跳出上述的錯誤 有高手能幫我解惑嗎,謝謝! -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 27.242.135.213 ※ 文章網址: https://www.ptt.cc/bbs/Python/M.1474625772.A.8A8.html

09/23 22:24, , 1F
應該是lxml沒裝成功 找找其他教學重安裝試試看
09/23 22:24, 1F

09/24 01:28, , 2F
用pip uninstall lxml 來解除安裝看看
09/24 01:28, 2F

09/24 12:06, , 3F
感謝大大們回答,但重新安裝後還是一樣@@
09/24 12:06, 3F

09/25 12:59, , 4F
你的python怎麼安裝的,是用什麼整合包還是...
09/25 12:59, 4F

09/25 13:47, , 5F
有安裝lxml嗎?
09/25 13:47, 5F

09/26 15:13, , 6F
http://jupyter.org/ 我用這個ide 頗好用的..
09/26 15:13, 6F

09/27 23:08, , 7F
已解決,改成lxml 32的whl,並裝在script資料夾
09/27 23:08, 7F
文章代碼(AID): #1NvG3iYe (Python)