こんにちは。
先日こちらで質問し、解決しなかったので一度pythonをアンインストールして
入れなおしました。
環境
・python 3.8
・windows 10
その後、コマンドプロンプトから再びmatplotlibをインストールしようとしたのですが
下記のエラーが出てしまい、困っております。
C:\Users\CF-SZ5>pip install matplotlib Collecting matplotlib Using cached https://files.pythonhosted.org/packages/12/d1/7b12cd79c791348cb0c78ce6e7d16bd72992f13c9f1e8e43d2725a6d8adf/matplotlib-3.1.1.tar.gz Requirement already satisfied: cycler>=0.10 in c:\users\cf-sz5\appdata\local\programs\python\python38-32\lib\site-packages (from matplotlib) (0.10.0) Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\cf-sz5\appdata\local\programs\python\python38-32\lib\site-packages (from matplotlib) (1.1.0) Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\users\cf-sz5\appdata\local\programs\python\python38-32\lib\site-packages (from matplotlib) (2.4.2) Requirement already satisfied: python-dateutil>=2.1 in c:\users\cf-sz5\appdata\local\programs\python\python38-32\lib\site-packages (from matplotlib) (2.8.0) Requirement already satisfied: numpy>=1.11 in c:\users\cf-sz5\appdata\local\programs\python\python38-32\lib\site-packages (from matplotlib) (1.17.3) Requirement already satisfied: six in c:\users\cf-sz5\appdata\local\programs\python\python38-32\lib\site-packages (from cycler>=0.10->matplotlib) (1.12.0) Requirement already satisfied: setuptools in c:\users\cf-sz5\appdata\local\programs\python\python38-32\lib\site-packages (from kiwisolver>=1.0.1->matplotlib) (41.4.0) Installing collected packages: matplotlib Running setup.py install for matplotlib ... error ERROR: Command errored out with exit status 1: command: 'c:\users\cf-sz5\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\CF-SZ5\AppData\Local\Temp\pip-install-x6via81_\matplotlib\setup.py'"'"'; __file__='"'"'C:\Users\CF-SZ5\AppData\Local\Temp\pip-install-x6via81_\matplotlib\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\CF-SZ5\AppData\Local\Temp\pip-record-2c5fw168\install-record.txt' --single-version-externally-managed --compile cwd: C:\Users\CF-SZ5\AppData\Local\Temp\pip-install-x6via81_\matplotlib\ Complete output (505 lines): ================================================================================ Edit setup.cfg to change the build options BUILDING MATPLOTLIB matplotlib: yes [3.1.1] python: yes [3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:21:23) [MSC v.1916 32 bit (Intel)]] platform: yes [win32] OPTIONAL SUBPACKAGES sample_data: yes [installing] tests: no [skipping due to configuration] OPTIONAL BACKEND EXTENSIONS agg: yes [installing] tkagg: yes [installing; run-time loading from Python Tcl/Tk] macosx: no [Mac OS-X only] OPTIONAL PACKAGE DATA dlls: no [skipping due to configuration] running install running build running build_py creating build creating build\lib.win32-3.8 copying lib\pylab.py -> build\lib.win32-3.8 creating build\lib.win32-3.8\matplotlib copying lib\matplotlib\afm.py -> build\lib.win32-3.8\matplotlib copying lib\matplotlib\animation.py -> build\lib.win32-3.8\matplotlib copying lib\matplotlib\artist.py -> build\lib.win32-3.8\matplotlib copying lib\matplotlib\axis.py -> build\lib.win32-3.8\matplotlib copying lib\matplotlib\backend_bases.py -> build\lib.win32-3.8\matplotlib copying lib\matplotlib\backend_managers.py -> build\lib.win32-3.8\matplotlib copying lib\matplotlib\backend_tools.py -> build\lib.win32-3.8\matplotlib copying lib\matplotlib\bezier.py -> build\lib.win32-3.8\matplotlib copying lib\matplotlib\blocking_input.py -> build\lib.win32-3.8\matplotlib copying lib\matplotlib\category.py -> build\lib.win32-3.8\matplotlib #文字数制限のため省略 3.8\matplotlib\mpl-data\fonts\ttf UPDATING build\lib.win32-3.8\matplotlib\_version.py set build\lib.win32-3.8\matplotlib\_version.py to '3.1.1' running build_ext building 'matplotlib.ft2font' extension creating build\temp.win32-3.8 creating build\temp.win32-3.8\Release creating build\temp.win32-3.8\Release\src C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DFREETYPE_BUILD_TYPE=system -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_ft2font_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -Iextern/agg24-svn/include -Ic:\users\cf-sz5\appdata\local\programs\python\python38-32\lib\site-packages\numpy\core\include -Ic:\users\cf-sz5\appdata\local\programs\python\python38-32\include -Ic:\users\cf-sz5\appdata\local\programs\python\python38-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tcsrc/checkdep_freetype2.c /Fobuild\temp.win32-3.8\Release\src/checkdep_freetype2.obj checkdep_freetype2.c src/checkdep_freetype2.c(1): fatal error C1083: include ファイルを開けません。'ft2build.h':No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX86\x86\cl.exe' failed with exit status 2 ---------------------------------------- ERROR: Command errored out with exit status 1: 'c:\users\cf-sz5\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\CF-SZ5\AppData\Local\Temp\pip-install-x6via81_\matplotlib\setup.py'"'"'; __file__='"'"'C:\Users\CF-SZ5\AppData\Local\Temp\pip-install-x6via81_\matplotlib\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\CF-SZ5\AppData\Local\Temp\pip-record-2c5fw168\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
エラー箇所をホームページで調べたのですが解決するに至りませんでした。
また、以前は違うエラーが出ていたのですがvisual studio2019をインストールすることで今のエラーに変わりました。
解決策を知っている方がいらっしゃいましたら宜しくお願いします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/10/24 04:48