gpt4 book ai didi

python - pip install --process-dependency-links app.whl 不安装私有(private)存储库( fork 库)

转载 作者:太空宇宙 更新时间:2023-11-03 21:46:56 26 4
gpt4 key购买 nike

我有一个关于分发我使用 .whl 创建的应用程序(而不是分发到 pypi)的问题。我想要实现的是能够做到 pip install --process-dependency-links my_app.whl 。到目前为止,安装在新的 virtualenv 上按预期进行,除了我在 dependency_links 中定义的内容之外。 。我的setup.py看起来像这样:

setup(
...
install_requires=[
'Click',
'flask',
....,
'vertica-python==0.7.3'
],
dependency_links=[
'https://github.com/lv10/vertica-python/tarball/master/#egg=vertica-python-0.7.3',
],
...
)

我关注了不同的tutorials并查阅了几个 stackoverflow 帖子:1 , 2 , 3 , 4 。然而,无论我尝试什么--process-dependency-links标志不会触发查找 dependency-links相反,安装过程会导致安装 vertica-python来自 pypi。

我跑pip install --process-dependency-links app.whl --verbose看看详细模式下是否有什么特别的。这是我得到的结果(确认显而易见的事情):

 1 location(s) to search for versions of vertica-python:
* https://pypi.org/simple/vertica-python/
Getting page https://pypi.org/simple/vertica-python/
Looking up "https://pypi.org/simple/vertica-python/" in the cache
Current age based on date: 3376
Freshness lifetime from max-age: 600
Freshness lifetime from request max-age: 600
https://pypi.org:443 "GET /simple/vertica-python/ HTTP/1.1" 304 0
Analyzing links from page https://pypi.org/simple/vertica-python/
Found link https://files.pythonhosted.org/packages/8b/31/12613db5e58d080d532027a1689f89fdd0d1d93aed48e4674fa4683eedea/vertica-python-0.1.tar.gz#sha256=716788811f3775e76adfc4642b133a4027208e37a59fad0f8a07de1877ccdbf6 (from https://pypi.org/simple/vertica-python/), version: 0.1
Found link https://files.pythonhosted.org/packages/33/1b/afbbadcbaa6807268de7df65d97663ee8eded3e3a4b287943dba275588d3/vertica-python-0.1.1.tar.gz#sha256=c2dc17bb8c7c8a15765c69f7295be9c0daa300740f70cb30447094a1c9552da7 (from https://pypi.org/simple/vertica-python/), version: 0.1.1

....

Found link https://files.pythonhosted.org/packages/07/32/d71082d200b865ed2324b4ad4ff9f03af3115485676d2ec1a413573da96b/vertica-python-0.7.2.tar.gz#sha256=28c820ee8fd963d9015d16ee94d847620b1648e30b3f46086d645f2b28057343 (from https://pypi.org/simple/vertica-python/), version: 0.7.2
Found link https://files.pythonhosted.org/packages/60/f6/71c1151a3fc632c55680f01f1fcbb2fc4e8ef4a86d08bb70fa0e4abf9184/vertica-python-0.7.3.tar.gz#sha256=0171a3bacdae06df4b0153d9da8adf2e591adaee818fdcb7555ff0376e4c8e11 (from https://pypi.org/simple/vertica-python/), version: 0.7.3
Found link https://files.pythonhosted.org/packages/de/ff/4471f16ea8b9e2699ee530454d7a042a05494979480a22f1d3cd047981aa/vertica-python-0.7.4.tar.gz#sha256=67b7cf6c684ebf3b152947cc80b1e16743d8454ae5fec052420eef343e7a3617 (from https://pypi.org/simple/vertica-python/), version: 0.7.4
Found link https://files.pythonhosted.org/packages/5a/63/0ddc75273d6437a7163ef69d3ab0670f36616f139fbe06698318b3d40474/vertica_python-0.7.4-py2.py3-none-any.whl#sha256=1869f83717d1a00585a5c6c1d45465757c1438724e4d5c125a8f75f2667b7c83 (from https://pypi.org/simple/vertica-python/), version: 0.7.4
Using version 0.7.3 (newest of versions: 0.7.3)
Using cached wheel link: file:///Users/username/Library/Caches/pip/wheels/fe/fe/ae/570b0448732a2e4cf4f929b797df935379a9e59092e42cc0d7/vertica_python-0.7.3-cp36-none-any.whl
Added vertica-python==0.7.3 from file:///Users/username/Library/Caches/pip/wheels/fe/fe/ae/570b0448732a2e4cf4f929b797df935379a9e59092e42cc0d7/vertica_python-0.7.3-cp36-none-any.whl (from app==0.0.19) to build tracker '/private/var/folders/n9/p_dhgb2s3wg9ypv9nrm8k320n6s9p1/T/pip-req-tracker-eob0khnd'
Removed vertica-python==0.7.3 from file:///Users/username/Library/Caches/pip/wheels/fe/fe/ae/570b0448732a2e4cf4f929b797df935379a9e59092e42cc0d7/vertica_python-0.7.3-cp36-none-any.whl (from app==0.0.19) from build tracker '/private/var/folders/n9/p_dhgb2s3wg9ypv9nrm8k320n6s9p1/T/pip-req-tracker-eob0khnd'

如果我使用pip install --process-dependency-links app.whl --find-links=https://github.com/lv10/vertica-python/tarball/master/master.tar.gz#egg=vertica-python-0.7.3然后安装了 fork 版本,这意味着 dependency_linkssetup.py被忽略。

提前致谢,我希望能朝着正确的方向插入。

最佳答案

我怀疑 pip 由于依赖项链接未以有效的包文件扩展名结尾而被抛弃。将 URL 设置为:

https://github.com/lv10/vertica-python/tarball/master/master.tar.gz#egg=vertica-python-0.7.3

关于python - pip install --process-dependency-links app.whl 不安装私有(private)存储库( fork 库),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52431707/

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