Ubuntu 16.04 虚拟环境安装matplotlib

Ubuntu 16.04 虚拟环境安装matplotlib

参考文献:
https://blog.csdn.net/weiqing1995/article/details/79846837
https://blog.csdn.net/mr_sdhm/article/details/79119300
pip和apt-get安装区别:https://blog.csdn.net/rona_lin/article/details/45028277

首先采用:sudo apt-get install python-matplotlib ,看起来安装成功,但是测试出错
(我尝试卸载:pip uninstall matplotlib
WARNING: Skipping matplotlib as it is not installed.)
需要使用pip:而且按照上述博客,需要先
pip install scipy
然后再
pip install matplotlib

测试 import matplotlib.pyplot as plt 出错:
ImportError: No module named ‘_tkinter’, please install the python3-tk package

安装 python3-tk,采用:pip install python3-tk;出错:
ERROR: Could not find a version that satisfies the requirement python3-tk (from versions: none)
ERROR: No matching distribution found for python3-tk
然后:sudo apt-get install python3-tk 成功。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值