一、环境描述(Environment description)¶
1、PC版本:win10 PC version is win10. 2、安装模块:ipython Installation module is ipython.
二、报错内容(Error content)¶
win10安装ipython模块时报错,报错内容如下: When installing the IPython module in win10,an error is reported.The error contents are as follows:
C:\Users\zq>pip install ipython
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:1124)'))': /simple/ipython/
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:1124)'))': /simple/ipython/
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:1124)'))': /simple/ipython/
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:1124)'))': /simple/ipython/
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:1124)'))': /simple/ipython/
Could not fetch URL https://pypi.org/simple/ipython/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/ipython/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1124)'))) - skipping
ERROR: Could not find a version that satisfies the requirement ipython (from versions: none)
ERROR: No matching distribution found for ipython
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(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1124)'))) - skipping
C:\Users\zq>pip3 install ipython
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:1124)'))': /simple/ipython/
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:1124)'))': /simple/ipython/
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:1124)'))': /simple/ipython/
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:1124)'))': /simple/ipython/
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:1124)'))': /simple/ipython/
Could not fetch URL https://pypi.org/simple/ipython/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/ipython/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1124)'))) - skipping
ERROR: Could not find a version that satisfies the requirement ipython (from versions: none)
ERROR: No matching distribution found for ipython
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(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1124)'))) - skipping
三、报错原因(Error reporting reason)¶
无法获取URL https://pypi.org/simple/pip/ Unable to get URL https://pypi.org/simple/pip/
四、更改为国内的镜像源(Change the mirror's source to domestic)¶
1、执行命令"pip3 install -i http://pypi.douban.com/simple ipython"发现报错,发现缺少'--trusted-host pypi.douban.com'参数。 Excute the command "pip3 install -i http://pypi.douban.com/simple ipython" found an error and found that the '--trusted-host pypi.douban.com' parameter is missing.
C:\Users\zq>pip3 install -i http://pypi.douban.com/simple ipython
Looking in indexes: http://pypi.douban.com/simple
WARNING: The repository located at pypi.douban.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host pypi.douban.com'.
ERROR: Could not find a version that satisfies the requirement ipython (from versions: none)
ERROR: No matching distribution found for ipython
WARNING: The repository located at pypi.douban.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host pypi.douban.com'.
2、继续执行命令"pip3 install ipython -i http://pypi.douban.com/simple --trusted-host pypi.douban.com"后,模块安装成功。 Contiune with the command "pip3 install ipython -i http://pypi.douban.com/simple --trusted-host pypi.douban.com",the module is installed successfully.
C:\Users\zq>pip3 install ipython -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
Looking in indexes: http://pypi.douban.com/simple
Collecting ipython
Downloading http://pypi.doubanio.com/packages/7e/f9/b60640b01e904055d378d01dd432458f869d61628f154cd48e495f628d57/ipython-8.3.0-py3-none-any.whl (750 kB)
----------------------------- 750.8/750.8 KB 4.7 MB/s eta 0:00:00
Collecting pickleshare
Downloading http://pypi.doubanio.com/packages/9a/41/220f49aaea88bc6fa6cba8d05ecf24676326156c23b991e80b3f2fc24c77/pickleshare-0.7.5-py2.py3-none-any.whl (6.9 kB)
Collecting decorator
Downloading http://pypi.doubanio.com/packages/d5/50/83c593b07763e1161326b3b8c6686f0f4b0f24d5526546bee538c89837d6/decorator-5.1.1-py3-none-any.whl (9.1 kB)
Collecting pygments>=2.4.0
Downloading http://pypi.doubanio.com/packages/5c/8e/1d9017950034297fffa336c72e693a5b51bbf85141b24a763882cf1977b5/Pygments-2.12.0-py3-none-any.whl (1.1 MB)
--------------------------------- 1.1/1.1 MB 3.6 MB/s eta 0:00:00
Collecting prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0
Downloading http://pypi.doubanio.com/packages/3f/2d/dcb44d69f388ca2ee1a4a4d3c204ab66b36975c0d5166781eaeeff76b882/prompt_toolkit-3.0.29-py3-none-any.whl (381 kB)
----------------------------- 381.5/381.5 KB 1.8 MB/s eta 0:00:00
Collecting stack-data
Downloading http://pypi.doubanio.com/packages/6b/25/9a454b432df53ffbbb4f03198c3347f393c34f4de07fb652563bdbdf91e8/stack_data-0.2.0-py3-none-any.whl (21 kB)
Requirement already satisfied: setuptools>=18.5 in c:\python\lib\site-packages (from ipython) (49.2.1)
Collecting matplotlib-inline
Downloading http://pypi.doubanio.com/packages/a6/2d/2230afd570c70074e80fd06857ba2bdc5f10c055bd9125665fe276fadb67/matplotlib_inline-0.1.3-py3-none-any.whl (8.2 kB)
Collecting backcall
Downloading http://pypi.doubanio.com/packages/4c/1c/ff6546b6c12603d8dd1070aa3c3d273ad4c07f5771689a7b69a550e8c951/backcall-0.2.0-py2.py3-none-any.whl (11 kB)
Collecting colorama
Downloading http://pypi.doubanio.com/packages/44/98/5b86278fbbf250d239ae0ecb724f8572af1c91f4a11edf4d36a206189440/colorama-0.4.4-py2.py3-none-any.whl (16 kB)
Collecting jedi>=0.16
Downloading http://pypi.doubanio.com/packages/b3/0e/836f12ec50075161e365131f13f5758451645af75c2becf61c6351ecec39/jedi-0.18.1-py2.py3-none-any.whl (1.6 MB)
--------------------------------- 1.6/1.6 MB 1.3 MB/s eta 0:00:00
Collecting traitlets>=5
Downloading http://pypi.doubanio.com/packages/37/46/be8a3c030bd3673f4800fa7f46eda972dfa2990089a51ec5dd0a26ed33e9/traitlets-5.1.1-py3-none-any.whl (102 kB)
----------------------------- 102.0/102.0 KB 5.7 MB/s eta 0:00:00
Collecting parso<0.9.0,>=0.8.0
Downloading http://pypi.doubanio.com/packages/05/63/8011bd08a4111858f79d2b09aad86638490d62fbf881c44e434a6dfca87b/parso-0.8.3-py2.py3-none-any.whl (100 kB)
----------------------------- 100.8/100.8 KB 1.9 MB/s eta 0:00:00
Collecting wcwidth
Downloading http://pypi.doubanio.com/packages/59/7c/e39aca596badaf1b78e8f547c807b04dae603a433d3e7a7e04d67f2ef3e5/wcwidth-0.2.5-py2.py3-none-any.whl (30 kB)
Collecting executing
Downloading http://pypi.doubanio.com/packages/61/d8/ad89910dc1da01a24135cb3dce702c72a8172f7b8f896ac0c4c34bcaf323/executing-0.8.3-py2.py3-none-any.whl (16 kB)
Collecting pure-eval
Downloading http://pypi.doubanio.com/packages/2b/27/77f9d5684e6bce929f5cfe18d6cfbe5133013c06cb2fbf5933670e60761d/pure_eval-0.2.2-py3-none-any.whl (11 kB)
Collecting asttokens
Downloading http://pypi.doubanio.com/packages/16/d5/b0ad240c22bba2f4591693b0ca43aae94fbd77fb1e2b107d54fff1462b6f/asttokens-2.0.5-py2.py3-none-any.whl (20 kB)
Requirement already satisfied: six in c:\python\lib\site-packages (from asttokens->stack-data->ipython) (1.16.0)
Installing collected packages: wcwidth, pure-eval, pickleshare, executing, backcall, traitlets, pygments, prompt-toolkit, parso, decorator, colorama, asttokens, stack-data, matplotlib-inline, jedi, ipython
Successfully installed asttokens-2.0.5 backcall-0.2.0 colorama-0.4.4 decorator-5.1.1 executing-0.8.3 ipython-8.3.0 jedi-0.18.1 matplotlib-inline-0.1.3 parso-0.8.3 pickleshare-0.7.5 prompt-toolkit-3.0.29 pure-eval-0.2.2 pygments-2.12.0 stack-data-0.2.0 traitlets-5.1.1 wcwidth-0.2.5
3、模块安装成功后,进入模块进行测试。 After the module is installed successfully,enter the module for test.
C:\Users\zq>ipython
Python 3.8.6 (tags/v3.8.6:db45529, Sep 23 2020, 15:37:30) [MSC v.1927 32 bit (Intel)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.3.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: print('wgsy')
wgsy
In [2]: print(2022*3)
6066