tell pip install to *NEVER* go to the network and *ALWAYS* download from a local directory

做~自己de王妃 提交于 2021-01-29 02:24:04

问题


I'm running on a disconnected network. I have downloaded a collection of wheels (.whl) and .tar.gz files to /mnt/dist/python. I want to install boto3 which is in the directory. All of the dependencies are also in the directory. However, when I tell pip to install either boto3 or boto-2.49.0-py2.py3-none-any.whl it tries to go to the network.

How do I tell it to install from /mnt/dist/python instead of going to the network?


回答1:


A slightly modified version of what @Marek Piotrowski commented worked out for me. I just move to the folder where the .whl file was stored and then typed

pip install --no-index --find-links . boto-2.49.0-py2.py3-none-any.whl


来源:https://stackoverflow.com/questions/63403161/tell-pip-install-to-never-go-to-the-network-and-always-download-from-a-local

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!