我通过代理安装pip时遇到了一些奇怪的问题。
当我在基本Conda环境(/conda
) pip安装工作正常(使用代理:HTTPS_PROXY
环境变量)。
但是当我切换到另一个Conda环境时,我得到代理错误:
$ conda activate /User/bryan_env
$ pip install xmltodict
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/xmltodict/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/xmltodict/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/xmltodict/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/xmltodict/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/xmltodict/
ERROR: Could not find a version that satisfies the requirement xmltodict
ERROR: No matching distribution found for xmltodict
我也试过使用.condarc
,但也有同样的错误。
重要的是,这些都是在Kuberenetes pod中运行的Jupyter shell。
你知道我哪里做错了吗?
我也有同样的问题,通过在中重新安装pip解决了这个问题环境使用:
conda install -c anaconda pip
之后,尝试pip install。