![](/img/trans.png)
[英]How to specify pip --extra-index-url in environment.yml?
[英]How to validate pip's --extra-index-url?
我無法在全局pip.ini
文件中使用--extra-index-url
定義的本地包索引中找到某些應找到的包。
如何驗證我的pip
是否正確使用了它? 在我的場景中,我使用的是虛擬環境。
我嘗試了pip config list
因為它在pip help
聽起來很有希望,但是我沒有得到任何輸出。
嘗試安裝不存在的模塊:
pip install --extra-index-url=https://example.com made-up
就我而言(除了很多錯誤),我還得到:
Looking in indexes: https://pypi.org/simple, https://example.com
Collecting made-up
Could not find a version that satisfies the requirement made-up (from versions: )
No matching distribution found for made-up
如果設置正確,您應該在輸出中看到額外的回購URL。 如果使用默認值運行,則不會顯示"Looking in indexes"
行。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.