ubuntu 安装 python-matplotlib遇到的问题

在Ubuntu系统中尝试使用apt-get安装python-matplotlib时遇到错误,提示没有安装候选。更新源列表无效后,通过在packages.ubuntu.com网站搜索发现,matplotlib的Python3版本名为python3-matplotlib。按照这个名字安装成功解决了问题。

        工作中,需要在ubuntu下测试c++代码, 想找一个简单的数据可视化工具。想到python上经常使用的matplotlib。根据github上的安装命令进行安装

 在终端输入命令:

sudo apt-get install python-matplotlib python-numpy

居然报错了。

sudo apt-get install python-matplotlib
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package python-matplotlib is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'python-matplotlib' has no installation candidate
 

尝试了好多方法, 

大部分说是 更新一下 源 列表什么的, 就是:sudo apt-get -y update  。但是对这个没有效果。

最后参考 这边博文:unable to locate package libavcodec-dev 解决办法_unable to locate package libva-dev_卜令彬的博客-优快云博客

http://packages.ubuntu.com

搜索了一下 matplotlib

 

发现在这个包在python3 下的名字为python3-matplotlib。 根据这个名称进行安装得以顺利进行。

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值