windows10安裝python依賴報錯can‘t?create?or?remove?files?in?install?directory問題
windows10安裝python依賴報錯can‘t create or remove files in install directory
執(zhí)行python setup.py安裝依賴時,
報如下錯誤:can’t create or remove files in install directory。
>> python setup.py install
running install
error: can't create or remove files in install directoryThe following error occurred while trying to add or remove files in the
installation directory:[Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-19811.write-test'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:/Library/Python/2.7/site-packages/
......
報錯
無法在安裝目錄中創(chuàng)建或刪除文件,想到是沒有權(quán)限的問題,查問題都說使用管理員權(quán)限重新執(zhí)行上面命令即可。
但是使用管理員權(quán)限打開terminal,再次執(zhí)行python setup.py install這個命令,還是報上面的錯誤。
下面通過卸載Windows自帶的Python,然后重裝解決這個問題。
在左下角搜索 設(shè)置 -> 應(yīng)用,搜索python,然后點擊卸載。
卸載后,到https://www.python.org/downloads/windows/下載對應(yīng)系統(tǒng)的可執(zhí)行文件安裝器,我的是64位,這里選擇安裝64位的Windows可執(zhí)行文件安裝器。
選擇自定義安裝,這里放到d盤softs目錄下,選擇將python添加到PATH環(huán)境變量中。
安裝成功后,在terminal中運行python命令,如下對應(yīng)版本信息,即表明安裝成功。
然后,再執(zhí)行python setup.py install命令,即可下載相關(guān)的依賴。
總結(jié)
以上為個人經(jīng)驗,希望能給大家一個參考,也希望大家多多支持腳本之家。
- Python虛擬環(huán)境virtualenv安裝的詳細教程保姆級(Windows和linux)
- 卸載所有通過pip安裝的Python包的方法總結(jié)(Windows系統(tǒng))
- 使用python查找windows系統(tǒng)中所有程序的安裝信息
- Windows下多版本Python共享Poetry測試安裝
- python?windows安裝cuda+cudnn+pytorch教程
- windows server 2008 r2 標準版安裝python環(huán)境
- windows安裝python超詳細圖文教程
- Python3.9最新版下載與安裝圖文教程詳解(Windows系統(tǒng)為例)
- 如何在Windows下載、安裝Python和配置環(huán)境(新手、保姆級教程)
相關(guān)文章
詳解如何從TensorFlow的mnist數(shù)據(jù)集導出手寫體數(shù)字圖片
這篇文章主要介紹了詳解如何從TensorFlow的mnist數(shù)據(jù)集導出手寫體數(shù)字圖片,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧2019-08-08Python將二維列表list的數(shù)據(jù)輸出(TXT,Excel)
這篇文章主要介紹了Python將二維列表list的數(shù)據(jù)輸出(TXT,Excel),文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧2020-04-04Python使用__new__()方法為對象分配內(nèi)存及返回對象的引用示例
這篇文章主要介紹了Python使用__new__()方法為對象分配內(nèi)存及返回對象的引用,結(jié)合實例形式分析了Python對象初始化及內(nèi)存操作相關(guān)使用技巧,需要的朋友可以參考下2019-09-09