TestPyPI 的Pip 安裝失敗:缺少要求
嘗試從TestPyPI 安裝Python 套件時,您可能需要會遇到一條錯誤,指出找不到依賴項,例如tqdm 和Jinja2。這是因為 TestPyPI 可能不託管這些依賴項,與主 PyPI 儲存庫不同。
要解決此問題,您可以:
1。提供依賴位置:
setup( ..., install_requires=['tqdm==3.4.0', 'Jinja2==2.8'], ..., )
2。使用額外索引URL:
pip install --extra-index-url https://testpypi.python.org/pypi poirot
此標誌將pip 定向到另外在主PyPI 儲存庫中搜尋TestPyPI 上未找到的依賴項。
3.更新PyPI 站點(對於最新的PyPI 版本):
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple poirot
以上是為什麼我的 pip 安裝從 TestPyPI 失敗,以及如何修復遺失的依賴項?的詳細內容。更多資訊請關注PHP中文網其他相關文章!