V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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 · 2020-12-29 13:52:09 +08:00 · 1114 次点击
    这是一个创建于 1231 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

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

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

    1 条回复    2020-12-29 14:13:11 +08:00
    sudoy
        1
    sudoy  
       2020-12-29 14:13:11 +08:00
    试试修改 setup .py , 将 里面的 dependency_links 以 dependency-links.txt 形式安装依赖。参考这个帖子:
    https://stackoverflow.com/questions/36544700/how-to-pip-install-a-package-that-has-git-dependencies
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2025 人在线   最高记录 6547   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 16:16 · PVG 00:16 · LAX 09:16 · JFK 12:16
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.