2016-05-20 9 views
0

matplotlibpip経由でインストールします。しかし、私は循環的な問題にぶつかり、ある時点で私は立ち往生した。matplotlibをインストールするために依存関係を解決するには?

Traceback (most recent call last): 
    File "/usr/bin/pip", line 5, in <module> 
    from pkg_resources import load_entry_point 
    File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 3080, in <module> 
    File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 3066, in _call_aside 
    File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 3093, in _initialize_master_working_set 
    File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 651, in _build_master 
    File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 952, in require 
    File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 839, in resolve 
pkg_resources.DistributionNotFound: The 'pip==1.5.4' distribution was not found and is required by the application 

私はeasy_installでこの問題を解決しようとしたが、それは次のエラーメッセージを生成:ターミナル内pipが生成する実行

Traceback (most recent call last): 
    File "/usr/bin/easy_install", line 5, in <module> 
    from pkg_resources import load_entry_point 
    File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 3080, in <module> 
    File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 3066, in _call_aside 
    File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 3093, in _initialize_master_working_set 
    File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 653, in _build_master 
    File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 666, in _build_from_requirements 
    File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 839, in resolve 
pkg_resources.DistributionNotFound: The 'setuptools==3.3' distribution was not found and is required by the application 

sudo apt-get install python-setuptoolsを実行すると、私はすでに最新バージョンを持っていることを言います。

OSはUbuntu 14.04です。私はこの問題を解決するためにさまざまなアプローチを試みましたが、おそらくさらに害を及ぼすことになりました。私はすべてのことを思い出していないし、どのように私がこの段階で終わったのか、残念ながらさらなる情報を与えることはできない。

私の目的は、matplotlibを最後にインストールし、すべての私のpython関連ライブラリの安定した状態を持つことです。どんな解決策も効果がありますので、問題を解決するために必要なものすべてを再インストールしても構いません。 sudo apt-get install python-matplotlibしかし、matplotlibはまだpythonから発見されない

Reading package lists... Done 
Building dependency tree  
Reading state information... Done 
python-matplotlib is already the newest version. 
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded. 

を生産するのに対しsudo apt-get build-dep python-matplotlibを実行

UPDATE

Reading package lists... Done 
Building dependency tree  
Reading state information... Done 
Picking 'matplotlib' as source package instead of 'python-matplotlib' 
E: Unable to find a source package for matplotlib 

を生成します。

+0

あなたは 'virtualenv'での作業を考えましたか? –

+0

私の人生が楽になり、回避策に似ているかどうかはわかりません。私はそれがどのように動作しているのかは分かりませんが、私が作業しているプロジェクトは主に 'C'プロジェクトであり、いくつかの面白いものに' python'を使用しています。 –

+0

'virtualenv'は一般的な修正プログラムとしても使用できます。必要なライブラリをすべてインストールしなくても、別のマシンでプログラムを実行しなくても、ソフトウェアを配布する必要がある場合は便利です。セットアップと使用はかなり簡単です:https://virtualenv.pypa.io/en/stable/userguide.html –

答えて

1

試してみてください。

sudo apt-get build-dep python-matplotlib 

これはにあなたを可能にする、(それらの依存関係の多くはpipにインストールするのは簡単ではないので)Ubuntuのパッケージ管理システムを経由してニーズをmatplotlibのの依存性をインストールする必要があります

pip install matplotlib 

出典:私は両方のUbuntu 14.04とKubuntuの15.10でこのプロセスを使用しているMatplotlib documentation

最新の安定したmatplotlibをインストールしてください(仮想環境では違いはありません)。

+0

残念ながら、それは問題を解決しませんでした。私の編集を参照してください。 –

+0

正しいPythonインストールを使ってmatplotlibを探していますか?'sudo apt-get install python-matplotlib'コマンドによれば、それはインストールされるべきですが、システムPythonではなく、システムPythonのパッケージを見つけることができないカスタムインストールを使用している可能性があります。 'which python'を試してください(システムPythonの場合は/ usr/bin/pythonでなければなりません)。 – StefanS

+0

はい、私は同じと仮定しました。 '' python''が本当に '/ usr/bin/python'を返すので、何が間違っているのか分かりません。 –

関連する問題