use*_*993 5 python pip anaconda conda
OC:MS Windows 10 专业版
康达:4.7.11
点数:19.2.2
蟒蛇:3.7.4
CUDA:10.1.168
需要在隔离的 conda 环境中安装 pycuda。我在 conda docs 中创建了新的 env :
conda create -n cudaenv
conda install -n cudaenv cudatoolkit
Run Code Online (Sandbox Code Playgroud)
然后安装pip:
conda install -n cudaenv pip
conda activate cudaenv
Run Code Online (Sandbox Code Playgroud)
并尝试在其中安装 pycuda:
pip install pycuda-2019.1.2+cuda101-cp37-cp37m-win_amd64.whl
Run Code Online (Sandbox Code Playgroud)
...然后发生错误
(cudaenv) D:\Downloads>**pip install pycuda-2019.1.2+cuda101-cp37-cp37m-win_amd64.whl**f
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Processing d:\downloads\pycuda-2019.1.2+cuda101-cp37-cp37m-win_amd64.whl
Collecting appdirs>=1.4.0 (from pycuda==2019.1.2+cuda101)
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/appdirs/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/appdirs/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/appdirs/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/appdirs/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/appdirs/
Could not fetch URL https://pypi.org/simple/appdirs/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/appdirs/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
ERROR: Could not find a version that satisfies the requirement appdirs>=1.4.0 (from pycuda==2019.1.2+cuda101) (from versions: none)
ERROR: No matching distribution found for appdirs>=1.4.0 (from pycuda==2019.1.2+cuda101)
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
Run Code Online (Sandbox Code Playgroud)
因此,尽管我试图从轮子安装 pycuda,但我还是收到了 SSL 错误。更重要的是,标志--trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org没有帮助,我遇到了同样的错误。
从基本环境 pip 正常工作。有人能说,是什么意思?
upd:看起来它试图从远程仓库获取 appdirs,但由于 ssl 问题而失败......--trusted-host仍然没有帮助。Pip的版本是最新的。