首页
注册
登录
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
V2EX
›
Python
问一个有关于 pip 安装远程仓库上的依赖的问题
huisezhiyin
·
2017-05-15 15:12:56 +08:00
· 2305 次点击
这是一个创建于 2536 天前的主题,其中的信息可能已经有所发展或是发生改变。
是这样 我司一直有一个自己做的依赖包 长期放在 gitlab 上 安装时通过 pip install git+ssh git@xxxxxx 来进行安装
最近在用阿里云的一个 sdk 这个 sdk 只能通过下载到本地之后使用 python setup install 来安装 如果使用 pip install git+ssh 就会报错
Complete output from command python setup.py egg_info:
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'egg_info'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-_Uz0Zr-build/
我尝试去除了 setup 文件中的 distribution.croe.setup 并用 setuptools.setup 替代
但仍然报这个错
我后来直接删除了 install_requires 这个参数
仍然报错 (只是报错信息里没有 /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'了)
请问该如何解决这个问题 让这个模块可以通过 pip install git+ssh 安装呢?
模块地址:https://github.com/aliyun/aliyun-log-python-sdk
Python
git
pip
install
2 条回复
•
2017-05-15 20:31:49 +08:00
1
guyskk
2017-05-15 20:12:01 +08:00
1
setuptools 导入了项目里面的 pkg_resources, 而这个
pkg_resources.py
可能有问题或者比较老了,现在的 setuptools 是自带 pkg_resources 的,可以把项目里的那个删掉
2
huisezhiyin
OP
2017-05-15 20:31:49 +08:00
@
guyskk
握草厉害 非常感谢
关于
·
帮助文档
·
博客
·
API
·
FAQ
·
我们的愿景
·
实用小工具
·
1491 人在线
最高记录 6543
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 31ms ·
UTC 23:56
·
PVG 07:56
·
LAX 16:56
·
JFK 19:56
Developed with
CodeLauncher
♥ Do have faith in what you're doing.