python mpl_toolkits installation issue

2019-03-09 16:55发布

After command pip install mpl_toolkits I receive next error:

Could not find a version that satisfies the requirement mpl_toolkits (from versions: )

No matching distribution found for mpl_toolkits

I tried to google, but nothing helps. How can I solve this?

3条回答
【Aperson】
2楼-- · 2019-03-09 17:03

It is not on PyPI and you should not be installing it via pip. If you have matplotlib installed, you should be able to import mpl_toolkits directly:

$ pip install --upgrade matplotlib
...

$ python
>>> import mpl_toolkits
>>> 
查看更多
在下西门庆
3楼-- · 2019-03-09 17:13

if anyone has a problem on Mac, can try this

sudo pip install --upgrade matplotlib --ignore-installed six
查看更多
孤傲高冷的网名
4楼-- · 2019-03-09 17:26

It doesn't work on Ubuntu 16.04, it seems that some libraries have been forgotten in the python installation package on this one. You should use package manager instead.

Solution

Uninstall matplotlib from pip then install it again with apt-get

python 2:

sudo pip uninstall matplotlib
sudo apt-get install python-matplotlib

python 3:

sudo pip3 uninstall matplotlib
sudo apt-get install python3-matplotlib
查看更多
登录 后发表回答