Python2 and Python 3 both exist in Windows OS and Matplotlib installation

在Windows 10系统上,已安装Python 27,目标是在不卸载Python 27的情况下安装Python 39。遇到的问题包括如何在两者间切换以及Matplotlib安装失败。解决方案包括选择自定义安装模式,将Python 39安装在同一目录,修改环境变量,以及根据错误提示从相关博客中找到解决Matplotlib安装问题的方法。
摘要由CSDN通过智能技术生成

Python2 and Python 3 both exist in Windows OS

  1. OS : windows 10
  2. Current lab status: Installed python27
  3. What do i want to do:
    3.1) Install python 39 while not uninstall python27 which mean i can use both the two versions
    3.2) Install matplotlib
  4. What’s the problems i met
    4.1) How to switch python3 and python2
    4.2) matplotlib can’t install success

How to Solve the two problems:

  1. How to switch python 2 and python3
    1.1) download python39 package
    1.2) Choose customize installation mode as to install it in the same dir with python2
    1.3) Change the bellowing two files as bellowing :
    在这里插入图片描述
    1.4) Add Python3 to Environment Path(Python2 has already been added)

在这里插入图片描述
1.5) Now open CMD window
Input python3 or input python2 to verify whether it works
在这里插入图片描述

2: How to solve matplotlib installation problems
2.1) The official website:
https://matplotlib.org/users/installing.html

Here are two command for reference.

在这里插入图片描述

However, after first command executed successfully, the second one can’t be done.

2.2) The error is :

C:\Python39>pip3 install matplotlib
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', timeout('_ssl.c:1106: The handshake operation timed out'))': /simple/matplotlib/
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:1123)'))': /simple/matplotlib/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', timeout('_ssl.c:1106: The handshake operation timed out
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值