質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

Q&A

解決済

3回答

2904閲覧

Python3.7.0、モジュールの追加でエラーが出ます

sinorrr

総合スコア11

Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

0グッド

0クリップ

投稿2018/06/30 14:34

編集2018/06/30 16:08

前提・実現したいこと

Python3.7.0でmatplotlibモジュールの導入

環境
Windows10
Python1.7.0

発生している問題・エラーメッセージ

(venv) C:\Users(ユーザー名)\PycharmProjects\untitled3>pip install matplotlib
Collecting matplotlib
Using cached https://files.pythonhosted.org/packages/ec/ed/46b835da53b7ed05bd4c6cae293f13ec26e877d2e490a5
3a709915a9dcb7/matplotlib-2.2.2.tar.gz
Complete output from command python setup.py egg_info:
============================================================================
Edit setup.cfg to change the build options

BUILDING MATPLOTLIB matplotlib: yes [2.2.2] python: yes [3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]] platform: yes [win32] REQUIRED DEPENDENCIES AND EXTENSIONS numpy: yes [version 1.14.5] install_requires: yes [handled by setuptools] libagg: yes [pkg-config information for 'libagg' could not be found. Using local copy.] freetype: no [The C/C++ header for freetype (freetype2\ft2build.h) could not be found. You may need to install the development package.] png: no [The C/C++ header for png (png.h) could not be found. You may need to install the development package.] qhull: yes [pkg-config information for 'libqhull' could not be found. Using local copy.] OPTIONAL SUBPACKAGES sample_data: yes [installing] toolkits: yes [installing] tests: no [skipping due to configuration] toolkits_tests: no [skipping due to configuration] OPTIONAL BACKEND EXTENSIONS macosx: no [Mac OS-X only] qt5agg: no [PySide2 not found; PyQt5 not found] qt4agg: no [PySide not found; PyQt4 not found] gtk3agg: no [Requires pygobject to be installed.] gtk3cairo: no [Requires cairocffi or pycairo to be installed.] gtkagg: no [Requires pygtk] tkagg: yes [installing; run-time loading from Python Tcl / Tk] wxagg: no [requires wxPython] gtk: no [Requires pygtk] agg: yes [installing] cairo: no [cairocffi or pycairo not found] windowing: yes [installing] OPTIONAL LATEX DEPENDENCIES dvipng: no ghostscript: no latex: no pdftops: no OPTIONAL PACKAGE DATA dlls: no [skipping due to configuration] ============================================================================ * The following required packages can not be built: * freetype, png * Please check http://gnuwin32.sourceforge.net/packa * ges/freetype.htm for instructions to install * freetype * Please check http://gnuwin32.sourceforge.net/packa * ges/libpng.htm for instructions to install png ----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in C:\Users\ユーザー名\AppData\Local\Temp\pip-install
-bq93kp4s\matplotlib\

該当のソースコード

pip install matplotlib

試したこと

Pythonの再インストール
Windowsコマンドプロンプト上/ターミナル上、両方で実行

補足情報(FW/ツールのバージョンなど)

Python始めて2日の超初心者です
回答お願いします

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

tatamyiwathy

2018/06/30 14:44

エラーメッセージは他にはありませんでしたか? そこに重要なことが書かれてるかもしれませんよ?
sinorrr

2018/06/30 15:10

Pycharmを使っているんですが、ターミナル上で赤字で表示されているのは本文に書いた1行のみです
tatamyiwathy

2018/06/30 15:56

そのターミナル上で「赤くないがなにか表示されている」部分はありましたか?
sinorrr

2018/06/30 16:09

長くて申し訳ないですが本文に出力をすべて貼りました。最終行が該当のエラー部分です
sinorrr

2018/06/30 18:33

pip install freetype とコマンド入力すると Could not find a version that satisfies the requirement freetype (from versions: ) No matching distribution found for freetypeと出てきました。古いバージョンを使えばなんとかなるんでしょうか
tatamyiwathy

2018/07/01 02:37

他の方がすでに回答されてますが、Python3.7は出たばかりなので、まだそのほかのモジュールが対応できてないんでしょうね。
guest

回答3

0

ベストアンサー

Python3.xバージョンは最近まで3.6で、ごく最近3.7がリリースされました。
PyPImatplotlib 2.2.2を確認してみると、まだ3.7には対応していないようです。

Unofficial Windows Binaries for Python Extension Packagesという非公式のパッケージの
matplotlib‑2.2.2‑cp37‑cp37m‑win32.whl(32bit版)または
matplotlib‑2.2.2‑cp37‑cp37m‑win_amd64.whl(64bit版)を導入することで解消されると思われます。

ただ

  • 特に最新3.7にする必要性がない
  • 今後numpyなどmatplotlib以外のモジュールも利用する予定がある

場合は、Python3.7.0をアンインストールして新規にAnacondaをインストールすることをお勧めします。

投稿2018/07/01 02:05

can110

総合スコア38233

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

0

Python 3.7は出たてでまだWheelファイルが出揃ってないでしょうから、超初心者であればしばらくはPython 3.6を使っておくといいと思います。

投稿2018/07/01 02:00

YouheiSakurai

総合スコア6142

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

0

Win10/64bit/python3 環境ですが
pip instal matlablib はエラー無くインストールされました。

https://stackoverflow.com/questions/39060669/python-matplotlib-install-issue-on-windows-7-for-freetype-png-packages/39060865 を参考にすると

http://www.lfd.uci.edu/~gohlke/pythonlibs/

Get matplotlib from above location. Choose correct package based on python(2.x/3.x) and bit(32/64) version.

32-bit 2.7: matplotlib-1.5.2-cp27-cp27m-win32.whl
64-bit 2.7: matplotlib-1.5.2-cp27-cp27m-win_amd64.whl

とあり、64bit/32bit版 およびpythonのバージョンが合ったものをインストールすると解消するとあります。

投稿2018/07/01 00:25

編集2018/07/01 04:47
yodel

総合スコア508

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

mkgrei

2018/07/01 03:27

3.7の誤植では?
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問