像matplotlib在pycharm安装时候报错Make sure that you use the correct version of 'pip' installed for your Python interpreter
就是在cmd进入下面的这个地址,然后运行
python.exe -m pip install matplotlib
如果报错
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting matplotlib
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/matplotlib/
此时需要换成国内源
阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
再输入python.exe -m pip install matplotlib -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
把红色的matplotlib替换成你要安装的库就可以了


本文解决在PyCharm中安装matplotlib时遇到的错误,包括使用正确的pip版本和解决TLS/SSL问题,通过更换国内源如阿里云、中国科技大学等,成功安装matplotlib及其它库。
1万+

被折叠的 条评论
为什么被折叠?



