以下からの続き
GitHub の master から install する方針で再チャレンジ
で、結局、
GitHub の master から install する方針で再チャレンジ
- Matplotlib / Installation # How to install
$ git clone https://github.com/matplotlib/matplotlib.git ... $ cd matplotlib $ pip3 install . ... UPDATING build/lib.cygwin-2.6.1-x86_64-3.4/matplotlib/_version.py set build/lib.cygwin-2.6.1-x86_64-3.4/matplotlib/_version.py to '2.0.0rc2+2897.ga430bf2' running build_ext building 'matplotlib.ft2font' extension creating build/temp.cygwin-2.6.1-x86_64-3.4 creating build/temp.cygwin-2.6.1-x86_64-3.4/src gcc -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/python3/python3-3.4.5-1.x86_64/build=/usr/src/debug/python3-3.4.5-1 -fdebug-prefix-map=/usr/src/ports/python3/python3-3.4.5-1.x86_64/src/Python-3.4.5=/usr/src/debug/python3-3.4.5-1 -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 -I/usr/lib/python3.4/site-packages/numpy/core/include -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include -I. -I/usr/include/python3.4m -c src/ft2font.cpp -o build/temp.cygwin-2.6.1-x86_64-3.4/src/ft2font.o gcc: エラー: spawn: No such file or directory error: command 'gcc' failed with exit status 1 ---------------------------------------- Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-4i6blq2s-build/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-0mz336m6-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-4i6blq2s-build/エラーの原因である
gcc: エラー: spawn: No such file or directoryが、何を意味するのか理解出来ずにしばらく悩んだのだが、「gcc: error: spawn: No such file or directory」でググったところ、一番上にヒットした
- FULL Tablog 2 / 2014-10-02: poderosaでcygwinをタブ化、的な
で、結局、
$ apt-cyg install gcc-g++ ... $ pip3 install . Processing /cygdrive/c/Users/kou/HOME/git/matplotlib Requirement already satisfied: numpy>=1.7.1 in /usr/lib/python3.4/site-packages (from matplotlib==2.0.0rc2+2897.ga430bf2) Requirement already satisfied: six>=1.10 in /usr/lib/python3.4/site-packages (from matplotlib==2.0.0rc2+2897.ga430bf2) Requirement already satisfied: python-dateutil in /usr/lib/python3.4/site-packages (from matplotlib==2.0.0rc2+2897.ga430bf2) Requirement already satisfied: pytz in /usr/lib/python3.4/site-packages (from matplotlib==2.0.0rc2+2897.ga430bf2) Requirement already satisfied: cycler>=0.10 in /usr/lib/python3.4/site-packages (from matplotlib==2.0.0rc2+2897.ga430bf2) Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=1.5.6 in /usr/lib/python3.4/site-packages (from matplotlib==2.0.0rc2+2897.ga430bf2) Installing collected packages: matplotlib Running setup.py install for matplotlib ... done Successfully installed matplotlib-2.0.0rc2+2897.ga430bf2ってな感じで、無事インストール出来て拍子抜けだった。
とりあえず python3 起こしてインタラクティブモードで
matplotlib.pyplot.show() の出力先ってどうすんの???
とりあえず
「matplotlib.pyplot.show 出力先」でググってみたら、以下のページが見つかった。
backend については以下かな?
あとは、以下の辺が参考になりそうだ。
import numpy as np import matplotlib.pyplot as plt x = np.arange(0,1,0.1) plt.plot(x,x) plt.show()なんてやってみたんだけど、当然、何も出てこない。
matplotlib.pyplot.show() の出力先ってどうすんの???
とりあえず
plt.savefig("/tmp/a.png")ってすれば、ファイルには吐けはするんだけど。
「matplotlib.pyplot.show 出力先」でググってみたら、以下のページが見つかった。
- Pythonやってみる! / 2014-08-29: (47) matplotlibでグラフ表示できない [解決]
backend については以下かな?
- Matplotlib / Usage #What is a backend?
あとは、以下の辺が参考になりそうだ。
- 茶国 Rev3 / 2016-10-22: [技術ネタ]ゼロから作るDeep Learning【DLfS】取り組み、Cygwin環境にPython3と各種パッケージを導入
タグ
コメントをかく