我有python 3.2.3在windows上。安装matplotlib
我正在努力做到这一点:
import matplotlib.pyplot as plt
我明白了:
Traceback (most recent call last):
File "<pyshell#10>", line 1, in <module>
import matplotlib.pyplot as plt
File "E:\programs\python 3.2.3\lib\site-packages\matplotlib\pyplot.py", line 24, in <module>
import matplotlib.colorbar
File "E:\programs\python 3.2.3\lib\site-packages\matplotlib\colorbar.py", line 29, in <module>
import matplotlib.collections as collections
File "E:\programs\python 3.2.3\lib\site-packages\matplotlib\collections.py", line 23, in <module>
import matplotlib.backend_bases as backend_bases
File "E:\programs\python 3.2.3\lib\site-packages\matplotlib\backend_bases.py", line 50, in <module>
import matplotlib.textpath as textpath
File "E:\programs\python 3.2.3\lib\site-packages\matplotlib\textpath.py", line 5, in <module>
import urllib.request, urllib.parse, urllib.error
ImportError: No module named urllib.request
有什么想法吗?
3条答案
按热度按时间e37o9pze1#
您需要安装urllib。这是matplotlib所必需的
brc7rcf02#
安装Python 3.10并更新pip,然后尝试安装Matplotlib并使用pip install urllib安装urllib
ovfsdjhp3#
Look Install
urllib
from : https://pypi.python.org/pypi/urllib2_file/0.2.1Or if you was instaled
pip
you can usesudo pip install urllib