gpt4 book ai didi

python - 通过 pip 将包安装到单独的目录

转载 作者:行者123 更新时间:2023-12-01 08:26:50 25 4
gpt4 key购买 nike

我正在尝试将依赖包安装到现有项目中的单独目录,如下所示:

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

但是当我运行blow命令时我仍然收到错误

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 将其打包。

关于python - 通过 pip 将包安装到单独的目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54182358/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com