
我正在使用沒有管理員權限的帳戶透過 bash 在 CentOS 系統上遠端工作,並且需要安裝 Python 套件 matplotlib。
我可以使用pip install -t target/directory
和來完成此操作virtualenv
,但是 matplotlib 需要一個系統包,freetype
我無法安裝,因此它抱怨如下:
* The following required packages can not be built:
* freetype
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_niccolo/matplotlib
因此,我下載了 freetype 的源代碼並運行“make”和“make install”。當然,我必須在使用者層級對自訂資料夾執行此操作,我嘗試將其包含在 bash $PATH 中。
現在,當我執行 pip install matplotlib 時,它似乎不知道我的自訂 freetype 安裝,並且一直抱怨與以前相同的錯誤。
我怎麼能讓 pip 了解在哪裡尋找 freetype?