我在试着做pip install --upgrade pip并保持
获取此错误:
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnection
Error('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x0000026F50B448C8>: Failed to establish a new connection: [WinError 10061] No connection could be made
because the target machine actively refused it'))': /simple/pytest/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnection
Error('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x0000026F50B59148>: Failed to establish a new connection: [WinError 10061] No connection could be made
because the target machine actively refused it'))': /simple/pytest/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnection
Error('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x0000026F50B596C8>: Failed to establish a new connection: [WinError 10061] No connection could be made
because the target machine actively refused it'))': /simple/pytest/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnection
Error('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x0000026F50B595C8>: Failed to establish a new connection: [WinError 10061] No connection could be made
because the target machine actively refused it'))': /simple/pytest/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnection
Error('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x0000026F50B5F2C8>: Failed to establish a new connection: [WinError 10061] No connection could be made
because the target machine actively refused it'))': /simple/pytest/
ERROR: Could not find a version that satisfies the requirement pytest
ERROR: No matching distribution found for pytest另外,由于这个错误,我不能安装任何新的包。
我尝试重新安装Pycharm,但没有成功。
我在网上尝试了一些其他建议的解决方案-仍然没有成功。
我知道它与代理有关,但我不熟悉它,任何人?
发布于 2021-11-06 14:28:08
尝试将构建命令附加到--network=host
例如:docker build -t cointainer_name . --network=host
If you use the host network mode for a container, that container’s network stack is not isolated from the
Docker host (the container shares the host’s networking namespace), and the container does not
get its own IP-address allocated.
For instance, if you run a container which binds to port 80 and you use host
networking, the container’s application is available on port 80 on the host’s IP address.请查看here了解更多详细信息
发布于 2022-02-09 14:13:23
首先,重新安装所有的python。其次,一旦安装了python,我就找到了host文件,并取消了host部分的注释。通常,windows中的路径位于C:\Windows\System32\drivers\etc
取消对此部分的注释:
本地主机名称解析在DNS本身中处理。
127.0.0.1 localhost
::1 localhost希望它能起作用!干杯!
https://stackoverflow.com/questions/67547176
复制相似问题