Я пытаюсь работать на коде python
которому нужно mathplotlib
. Путем ввода:
python3 mouse_click.py
дает ошибку
ImportError: No module named 'matplotlib'
Для установки
sudo apt-get install python-matplotlib
Результат:
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-matplotlib is already the newest version.
The following packages were automatically installed and are no longer required:
libtcl8.5 libtk8.5 tcl8.5 tk8.5
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Это показывает, что все в порядке, и я уже установил его. Но это не.
После этого я попробовал:
sudo apt-get install python3-mathplotlib
Результат:
E: Unable to locate package python3-mathplotlib
Затем я попробовал:
sudo apt-get build-dep python-matplotlib
Вот результат вышеупомянутого кода:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Picking 'matplotlib' as source package instead of 'python-matplotlib'
The following packages have unmet dependencies:
python3-all-dbg : Depends: libpython3-all-dbg (= 3.4.0-0ubuntu2) but it is not going to be installed
Depends: python3-dbg (= 3.4.0-0ubuntu2) but it is not going to be installed
Depends: python3.4-dbg but it is not going to be installed
python3-all-dev : Depends: libpython3-all-dev (= 3.4.0-0ubuntu2) but it is not going to be installed
Depends: python3-dev (= 3.4.0-0ubuntu2) but it is not going to be installed
Depends: python3.4-dev but it is not going to be installed
python3-numpy-dbg : Depends: python3-dbg but it is not going to be installed
E: Build-dependencies for python-matplotlib could not be satisfied.
Наконец:
sudo apt-get build-dep python3-matplotlib
Результат:
Picking 'matplotlib' as source package instead of 'python3-matplotlib'
The following packages have unmet dependencies:
python3-all-dbg : Depends: libpython3-all-dbg (= 3.4.0-0ubuntu2) but it is not going to be installed
Depends: python3-dbg (= 3.4.0-0ubuntu2) but it is not going to be installed
Depends: python3.4-dbg but it is not going to be installed
python3-all-dev : Depends: libpython3-all-dev (= 3.4.0-0ubuntu2) but it is not going to be installed
Depends: python3-dev (= 3.4.0-0ubuntu2) but it is not going to be installed
Depends: python3.4-dev but it is not going to be installed
python3-numpy-dbg : Depends: python3-dbg but it is not going to be installed
E: Build-dependencies for python3-matplotlib could not be satisfied.
Я не сделал установил любой Python, потому что ubuntu 14.04
уже имейте Python 3.4.3
. Я нуждаюсь в помощи об установке mathplotlib
выполнять мой код.
Вы используете python3
, и поэтому Вам нужно python3-matplotlib
, но Вы сделали одну ошибку:
название пакета python3-matplotlib
и не python3-mathplotlib
.
Поэтому устанавливают
sudo apt-get install python3-matplotlib
<час> , Установка библиотек развития через
sudo apt-get build-dep …
не необходима.