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

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

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

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

Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

pip

pipとは、Pythonを用いて書かれているパッケージソフトのインストールや管理を行うためのパッケージマネジメントシステムです。pipを使う主なメリットは、コマンドラインインターフェースにて容易にPythonパッケージソフトをインストール可能だという点です。

Q&A

解決済

1回答

4569閲覧

virtualenvにモジュールがインストールできません。

doz13189

総合スコア38

Python 3.x

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

Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

pip

pipとは、Pythonを用いて書かれているパッケージソフトのインストールや管理を行うためのパッケージマネジメントシステムです。pipを使う主なメリットは、コマンドラインインターフェースにて容易にPythonパッケージソフトをインストール可能だという点です。

0グッド

0クリップ

投稿2016/07/17 10:06

OS:ubutnu
言語python3

python3のvirtualenvの中で、pipを使ってモジュールをインストールしようとしているのですが、できません。

python3

1pip install matplotlib

例えば、matplotlibをインストールしようとすると、

Collecting matplotlib Using cached matplotlib-1.5.1.tar.gz Complete output from command python setup.py egg_info: ============================================================================ Edit setup.cfg to change the build options BUILDING MATPLOTLIB matplotlib: yes [1.5.1] python: yes [3.5.1+ (default, Mar 30 2016, 22:46:26) [GCC 5.3.1 20160330]] platform: yes [linux] REQUIRED DEPENDENCIES AND EXTENSIONS numpy: yes [not found. pip may install it below.] dateutil: yes [dateutil was not found. It is required for date axis support. pip/easy_install may attempt to install it after matplotlib.] pytz: yes [pytz was not found. pip will attempt to install it after matplotlib.] cycler: yes [cycler was not found. pip will attempt to install it after matplotlib.] tornado: yes [tornado was not found. It is required for the WebAgg backend. pip/easy_install may attempt to install it after matplotlib.] pyparsing: yes [pyparsing was not found. It is required for mathtext support. pip/easy_install may attempt to install it after matplotlib.] libagg: yes [pkg-config information for 'libagg' could not be found. Using local copy.] freetype: no [The C/C++ header for freetype2 (ft2build.h) could not be found. You may need to install the development package.] png: no [pkg-config information for 'libpng' could not be found.] qhull: yes [pkg-config information for 'qhull' could not be found. Using local copy.] OPTIONAL SUBPACKAGES sample_data: yes [installing] toolkits: yes [installing] tests: yes [nose 0.11.1 or later is required to run the matplotlib test suite. Please install it with pip or your preferred tool to run the test suite / using unittest.mock] toolkits_tests: yes [nose 0.11.1 or later is required to run the matplotlib test suite. Please install it with pip or your preferred tool to run the test suite / using unittest.mock] OPTIONAL BACKEND EXTENSIONS macosx: no [Mac OS-X only] qt5agg: no [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: no [The C/C++ header for Tk (tk.h) could not be found. You may need to install the development package.] wxagg: no [requires wxPython] gtk: no [Requires pygtk] agg: yes [installing] cairo: no [cairocffi or pycairo not found] windowing: no [Microsoft Windows only] OPTIONAL LATEX DEPENDENCIES dvipng: no ghostscript: yes [version 9.18] latex: no pdftops: yes [version 0.41.0] OPTIONAL PACKAGE DATA dlls: no [skipping due to configuration] ============================================================================ * The following required packages can not be built: * freetype, png

これが表示され、最後に

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-udzh0c0r/matplotlib/

これが赤文字で表示され、インストールできません。
easy_installやget-aptも試したのですが、上手く行きません。
python2の環境で行ったり、virtualenvを抜けると上手く行ったりと何が原因かわかりません。
いろいろググったのですが、わからないのでどなたか教えてください。

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

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

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

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

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

guest

回答1

0

ベストアンサー

とりあえず、こういう記事を見つけたので、お知らせしておきます。

Ubuntu15.04でpipでMatplotlibがインストールできない件 - python3.4から始めるプログラミング日記
http://ng3rdstmadgke.hatenablog.com/entry/2015/10/14/144330

ただ、これで確実に解決するかどうかは分かりません。

pipはビルドを行ってインストールするので、少し複雑なライブラリーだと知識がない人には難しかったりします。
Matplotlibのようなメジャーなライブラリーなら、Anacondaというパッケージを使ってインストールしたほうが楽だと思いますよ。

Download Anaconda now! | Continuum
https://www.continuum.io/downloads

...

参考リンク:

データサイエンティストを目指す人のpython環境構築 2016 - Qiita
http://qiita.com/y__sama/items/5b62d31cb7e6ed50f02c

AnacondaでPythonの分析環境をまとめてインストール - TASK NOTES
http://www.task-notes.com/entry/20151116/1447642800

投稿2016/07/17 15:26

argius

総合スコア9390

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

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

doz13189

2016/07/17 17:17

Anacondaを使うことにしました!ありがとうございます!!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問