###前提・実現したいこと
初めてのPythonです。
Anacondaをインストールして
IPythonにて
import matplotlib.pyplot as plt
と入力するとエラーが出てしまいます。
検索して調べたのですが解決できませんでした。
Windows10とWindows8.1のどちらでも同じ症状が出ます。
アドバイスいただけないでしょうか。
###発生している問題・エラーメッセージ
-------------------------------------------------------------------------- FileNotFoundError Traceback (most recent call last) C:\Users\MyName\Anaconda3\lib\site-packages\matplotlib\font_manager.py in <module>() 1428 try: -> 1429 fontManager = pickle_load(_fmcache) 1430 if (not hasattr(fontManager, '_version') or C:\Users\MyName\Anaconda3\lib\site-packages\matplotlib\font_manager.py in pickle_load(filename) 964 """ --> 965 with open(filename, 'rb') as fh: 966 data = pickle.load(fh) FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\MyName\\.matplotlib\\fontList.py3k.cache' During handling of the above exception, another exception occurred: ValueError Traceback (most recent call last) <ipython-input-1-eff513f636fd> in <module>() ----> 1 import matplotlib.pyplot as plt C:\Users\MyName\Anaconda3\lib\site-packages\matplotlib\pyplot.py in <module>() 27 from cycler import cycler 28 import matplotlib ---> 29 import matplotlib.colorbar 30 from matplotlib import style 31 from matplotlib import _pylab_helpers, interactive C:\Users\MyName\Anaconda3\lib\site-packages\matplotlib\colorbar.py in <module>() 34 import matplotlib.collections as collections 35 import matplotlib.colors as colors ---> 36 import matplotlib.contour as contour 37 import matplotlib.cm as cm 38 import matplotlib.gridspec as gridspec C:\Users\MyName\Anaconda3\lib\site-packages\matplotlib\contour.py in <module>() 20 import matplotlib.colors as colors 21 import matplotlib.collections as mcoll ---> 22 import matplotlib.font_manager as font_manager 23 import matplotlib.text as text 24 import matplotlib.cbook as cbook C:\Users\MyName\Anaconda3\lib\site-packages\matplotlib\font_manager.py in <module>() 1437 raise 1438 except: -> 1439 _rebuild() 1440 else: 1441 _rebuild() C:\Users\MyName\Anaconda3\lib\site-packages\matplotlib\font_manager.py in _rebuild() 1416 global fontManager 1417 -> 1418 fontManager = FontManager() 1419 1420 if _fmcache: C:\Users\MyName\Anaconda3\lib\site-packages\matplotlib\font_manager.py in __init__(self, size, weight) 1051 # Load TrueType fonts and create font dictionary. 1052 -> 1053 self.ttffiles = findSystemFonts(paths) + findSystemFonts() 1054 self.defaultFamily = { 1055 'ttf': 'DejaVu Sans', C:\Users\MyName\Anaconda3\lib\site-packages\matplotlib\font_manager.py in findSystemFonts(fontpaths, fontext) 323 fontpaths = [fontdir] 324 # now get all installed fonts directly... --> 325 for f in win32InstalledFonts(fontdir): 326 base, ext = os.path.splitext(f) 327 if len(ext)>1 and ext[1:].lower() in fontexts: C:\Users\MyName\Anaconda3\lib\site-packages\matplotlib\font_manager.py in win32InstalledFonts(directory, fontext) 239 if not os.path.dirname(direc): 240 direc = os.path.join(directory, direc) --> 241 direc = os.path.abspath(direc).lower() 242 if os.path.splitext(direc)[1][1:] in fontext: 243 items[direc] = 1 C:\Users\MyName\Anaconda3\lib\ntpath.py in abspath(path) 542 path = os.fspath(path) 543 try: --> 544 path = _getfullpathname(path) 545 except OSError: 546 pass # Bad path - return unchanged. ValueError: _getfullpathname: embedded null character in path
###該当のソースコード
import matplotlib.pyplot as plt
###試したこと
課題に対してアプローチしたことを記載してください
###補足情報(言語/FW/ツール等のバージョンなど)
Python 3.6.0
Anaconda 4.3.1 (64-bit)
Windows10
IPython 5.1.0
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/03/29 12:43 編集
2017/03/29 12:44