PyCharm手動安裝第三方庫lxml

2021-10-22 17:12:01 字數 680 閱讀 5024

壓縮包解壓,解壓完後找到該資料夾(注意層級)

注意目錄是src下面的lxml

3、重新開啟pycram,匯入這個lxml包。

執行import lxml報錯

import lxml.html

file "d:\programs\python3.9\lib\lxml\html\__init__.py", line 53, in

from .. import etree

importerror: cannot import name 'etree' from 'lxml' (d:\programs\python3.9\lib\lxml\__init__.py)

所以想了其它辦法,git cmd上不是能import lxml嘛,那就全磁碟檢索lxml檔案目錄,找找lxml的檔案目錄,找到了,copy到pycram的python路徑的lib目錄下

之後重新登入pycram,試試,成功

手動安裝python第三方庫

手動安裝請到https gohlke pythonlibs 然後在用命令列pip install whl檔案路徑 這時可能會出現錯誤 isnot a supported wheel on this platform 那是因為你的檔名錯誤,也就是說用pip安裝第三庫的whl檔案的名字不規範 以下是規範...

pyCharm安裝requests第三方庫

pycharm file settings project interpreter直接新增會報如下錯 try to run this command from the system terminal.make sure that you use the correct version of pip ...

Python 手動安裝第三方包

python 安裝第三方包時 常用以下方法,方便快捷,pip install watchdog 但是有些包就是不能自動安裝成功,就得手動安裝。2.將whl檔案放到python環境下lib下的site packages下,3.cmd到whl路徑執行pip install watchdog,這樣是安裝到...