[Errno 2] No such file or directory: '/usr/lib/python3/dist-packages/scipy/_lib/decorator.py處理

[Errno 2] No such file or directory: '/usr/lib/python3/dist-packages/scipy/_lib/decorator.py處理

大環(huán)境ubuntu18.04,python3.6.8,在使用sklearn調(diào)用混淆矩陣的時(shí)候報(bào)錯(cuò),于是打算重新安裝scipy,可是在安裝scipy時(shí)總是不成功,報(bào)錯(cuò)內(nèi)容如下:
[Errno 2] No such file or directory: '/usr/lib/python3/dist-_packages/scipy/_lib/decorator.py

吐槽

找了各種辦法,重裝了numpy、scipy、sklearn不下五六遍吧,上述的問(wèn)題依然存在...
早就應(yīng)該用google搜索解決問(wèn)題,本猜想是個(gè)小問(wèn)題,無(wú)疑是版本的問(wèn)題,誰(shuí)知道...哎,浪費(fèi)了大半個(gè)晚上

方法

通過(guò)安裝過(guò)程中總是出現(xiàn)的錯(cuò)誤顯示沒(méi)有decorator.py這個(gè)文件,到該路徑下找到了decorator.py文件,但是該文是==空文件==,直接google到方法,重新安裝decoratro直接解決問(wèn)題:

>>sudo apt install --reinstall python\*-decorator

上述直接安裝python-decoratorpython3-decorator,安裝后,再安裝numpy、scipy、sklearn一路下來(lái),沒(méi)報(bào)任何錯(cuò)誤。

又可以安心的學(xué)習(xí)python啦~

參考
package python3-scipy 0.17.0-1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容