[英]Installing a package to a separate directory by pip
我正在嘗試將依賴包安裝到現有項目中的單獨目錄中,如下所示:
python -m pip install -t C:\Users\Mahdi\eclipse-workspace\
google-cloud-functions\com\mahdi\python\functions\gcs\dependency com.mahdi.python.file_igestion
但我得到以下錯誤。 有什么我想念的嗎?
Could not find a version that satisfies the requirement com.mahdi.pyhton.file_igestion (from versions: )
No matching distribution found for com.mahdi.pyhton.file_igestion
編輯:根據建議,我可以通過 setup.py sdidst 安裝包,我可以看到安裝的包
C:\Users\Mahdi\eclipse-workspace\google-cloud-functions>python -m pip list
Package Version Location
------------------------ ---------- -------------------------------------------------------
file-ingestion 0.2 c:\users\mahdi\eclipse-workspace\google-cloud-functions
但是當我運行吹命令時,我仍然收到錯誤
C:\Users\Mahdi\eclipse-workspace\google-cloud-functions\com\mahdi\python\functions\gcs>python -m pip install -t C:\Users\Mahdi\ecli
pse-workspace\google-cloud-functions\com\mahdi\python\functions\gcs\dependency file-ingestion
Collecting file-ingestion
Could not find a version that satisfies the requirement file-ingestion (from versions: )
No matching distribution found for file-ingestion
You are using pip version 10.0.1, however version 18.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
要安裝您在本地構建的軟件包,您需要使用類似於
pip install mypackage --no-index --find-links file:///srv/pkg/mypackage
您需要先使用python setup.py sdist
將其打包。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.