当前位置: 代码迷 >> 综合 >> paddle的安装,遇到错误Could not fetch URL https://mirror.baidu.com/pypi/simple/paddlepaddle/
  详细解决方案

paddle的安装,遇到错误Could not fetch URL https://mirror.baidu.com/pypi/simple/paddlepaddle/

热度:71   发布时间:2023-12-04 01:23:17.0

安装paddle时出现错误

C:\Users\Admin>pip install paddlepaddle==2.0.2 -i https://mirror.baidu.com/pypi/simple --trusted-host pypi.baidu.com
Looking in indexes: https://mirror.baidu.com/pypi/simple
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:777)'),)': /pypi/simple/paddlepaddle/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:777)'),)': /pypi/simple/paddlepaddle/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:777)'),)': /pypi/simple/paddlepaddle/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:777)'),)': /pypi/simple/paddlepaddle/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:777)'),)': /pypi/simple/paddlepaddle/
Could not fetch URL https://mirror.baidu.com/pypi/simple/paddlepaddle/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='mirror.baidu.com', port=443): Max retries exceeded with url: /pypi/simple/paddlepaddle/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:777)'),)) - skipping
ERROR: Could not find a version that satisfies the requirement paddlepaddle==2.0.2
ERROR: No matching distribution found for paddlepaddle==2.0.2
Could not fetch URL https://mirror.baidu.com/pypi/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='mirror.baidu.com', port=443): Max retries exceeded with url: /pypi/simple/pip/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:777)'),)) - skipping

换了一下源

pip install paddlepaddle==2.0.2 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

遇到错误

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
numpy-stl 2.16.0 requires python-utils>=1.6.2, which is not installed.

重新安装这个包

pip install python-utils -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip install numpy-stl -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

安装成功,然后

conda install paddlepaddle==2.0.2 -c paddle
python
import paddle
paddle.utils.run_check()

得到结果

PaddlePaddle is installed successfully!

安装成功!

  相关解决方案