安装matplot

 为了安装matplot,需要升级pip,需要安装python大于3.5的版本。

python3.7 -m pip install --user --upgrade pip==9.0.3

 弄完了,执行上述命令,提示我:

Can't connect to HTTPS URL because the SSL module is not available.

 按照[1]的教程,我指定了ssl的参数了。[2]说python3中的ssl是有版本要求的。

而python3.7需要的openssl的版本为1.0.2或者1.1.x,需要对openssl进行升级,并重新编译python3.7.0

好像以上操作时不需要的,按照[6],只用在root用户下:

python -m pip install -U pip setuptools
sudo apt-get install python-dev
python -m pip install matplotlib

 可能需要升级six

sudo pip install six --upgrade --ignore-installed six

[1] 初学Ubuntu:升级python到3.7
[2] python3.7安装后ssl问题
[3] python3中pip3安装出错,找不到SSL
[4] Ubuntu 升级 openssl 的方案
[5]centos6.8安装python3.7无法import _ssl
[6] 为python安装matplotlib模块
[7]Python.h:No such file or directory
[8]使用例子https://github.com/jbmouret/matplotlib_for_papers

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容