推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
deplives
V2EX  ›  Python

pip 从 git 安装包的时候无法安装 setup 中的 install_requires 里面的依赖

  •  
  •   deplives · Dec 29, 2020 · 1825 views
    This topic created in 2097 days ago, the information mentioned may be changed or developed.

    因为公司内部需求,需要将一个内部的 python 包分发给不同的人使用,目前采用的是内网 git 上直接安装

    pip3 install git+http://xxxx.git --upgrade
    

    但是出现了一个问题,就是这个包依赖其他的一些第三方包,而且我也把这些第三方包写在了 setup 中的 install_requires 里面,但是当我用 pip git 安装的时候貌似这些第三方包也会默认从这个 git 上面安装。而导致安装失败,有没有什么办法可以解决这个问题

    1 replies  •  2020-12-29 14:13:11 +08:00
    sudoy
        1
    sudoy  
       Dec 29, 2020
    试试修改 setup .py , 将 里面的 dependency_links 以 dependency-links.txt 形式安装依赖。参考这个帖子:
    https://stackoverflow.com/questions/36544700/how-to-pip-install-a-package-that-has-git-dependencies
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2580 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 11:47 · PVG 19:47 · LAX 04:47 · JFK 07:47
    ♥ Do have faith in what you're doing.