Đây là setup.py của tôi:Vấn đề với cài đặt gói từ dependency_links
setup(
...
install_requires=['GEDThriftStubs'],
dependency_links=['git+ssh://[email protected]/ged-thrift-stubs.git#egg=GEDThriftStubs'],
...)
Sau đó, tôi tạo gói:
python setup.py sdist
Sau đó, tôi cố gắng để cài đặt nó:
pips cài đặt tệp: //path/package-0.0.1.tar.gz
Và có được điều này trong thiết bị đầu cuối:
Downloading/unpacking GEDThriftStubs (from package==0.0.1)
Could not find any downloads that satisfy the requirement GEDThriftStubs (from package==0.0.1)
No distributions at all found for GEDThriftStubs (from package==0.0.1)
Và trong các tin nhắn pip.log như thế này:
Skipping link git+ssh://[email protected]/ged-thrift-stubs.git#egg=GEDThriftStubs; wrong project name (not gedthriftstubs)
Và tôi không có bất cứ nơi nào trong dự án của tôi mà chính xác tên "gedthriftstubs", nếu nó vấn đề.
Nhưng điều này hoạt động tốt:
pip install git+ssh://[email protected]/ged-thrift-stubs.git#egg=GEDThriftStubs
Ah, xin lỗi, lỗi của tôi. –
Bạn đang thử 'sudo python setup.py sdist' hoặc chỉ' python setup.py sdist'? –
Tôi chạy cả hai lệnh không có sudo dưới một người dùng và bên trong một virtualenv. – azurkin