問題描述
在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