[英]How to cerate local cahe for pip to use in LAN without internet?
I am trying to get pip install working in a machine without internet connection.我试图让 pip 安装在没有互联网连接的机器上工作。 I tried using three proxies(devpi-server, proxypypi and pypicache) in a server within same LAN, but with internet connection.
我尝试在同一 LAN 内的服务器中使用三个代理(devpi-server、proxypypi 和 pypicache),但具有 Internet 连接。
pip --no-cache-dir --trusted-host <serverip> install -i http://<serverip>:3141/root/pypi/+simple/ Flask
Pip ends up not using the proxy and try to collect packages directly from piwheels.org and files.pythonhosted.org and throws error(since the machine doesn't have internet connection). Pip 最终没有使用代理并尝试直接从 piwheels.org 和 files.pythonhosted.org 收集包并抛出错误(因为机器没有互联网连接)。
Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host='www.piwheels.org', port=443): Max retries exceeded with url: /simple/flask/ (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x75729ad0>: Failed to establish a new connection: [Errno 101] Network is unreachable',))
Any solutions?有什么解决办法吗? Thank you
谢谢
I usually use the --proxy flag as the example here我通常在这里使用 --proxy 标志作为示例
sudo pip install --proxy=https://[username:password@]proxyserver:port somepackage
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.