pip安裝時報錯:must supply either home or prefix/exec-prefix -- not both

問題描述

在MacOS上使用pip如下命令安裝第三方庫至指定目錄時

pip install --target=./site_packages toml

有可能會出現以下問題:

must supply either home or prefix/exec-prefix -- not both

問題解決

新建一個文件 ~/.pydistutils.cfg ,內容如下:

[install]
prefix=

參考文獻

https://stackoverflow.com/questions/24257803/distutilsoptionerror-must-supply-either-home-or-prefix-exec-prefix-not-both

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章