Python3-Module

Python3-Module

Ich habe vor Kurzem Ubuntu 14.04 installiert und bin seit mehreren Jahren ein Python-Enthusiast, seitdem ich Python im Graduiertenkolleg für die (Text-)Datenanalyse verwendet habe.

Mir ist aufgefallen, dass 14.04 sowohl mit Python 2.7 als auch mit 3.4 geliefert wird. Das Repository installiert jedoch nur Python-Module für Python 2.7. Ich habe mich gefragt, ob mir jemand die Schritte zur Installation von Modulen für Python 3.4 (insbesondere Numpy und Matplotlib) erklären könnte, wenn der Standardwert „Python“ Python 2.7 ergibt.

Danke. Keine Eile mit der Antwort.

Antwort1

Wie bain hervorhebt, werden Sie feststellen, dass die Module von python3.x das Präfix haben python3-<pkgname>. Sie können dies feststellen, indem Sie den Paketcache durchsuchen (der verfügbare und nicht installierte Pakete enthält).

Hier sind einige relevante Befehle:

apt-cache search numpy | egrep ^python3  # search for numpy, python3
apt-cache search -n ^python3             # search only package names for python3

Der ^python3Ausdruck beschränkt sich auf Pakete, die mit „python3“ beginnen, und „-n“ beschränkt die Suche auf Namen (keine langen Beschreibungen). Sie können diese für allgemeinere Suchen entfernen.

Hier einige Beispielausgaben:

$ apt-cache search numpy | egrep ^python3
python3-numpy - Fast array facility to the Python 3 language
python3-numpy-dbg - Fast array facility to the Python 3 language (debug extension)
python3-h5py - h5py is a general-purpose Python interface to hdf5
python3-mpi4py - bindings of the Message Passing Interface (MPI) standard
python3-mpi4py-dbg - bindings of the MPI standard -- debug symbols
python3-numexpr - Fast numerical array expression evaluator for Python 3 and NumPy
python3-numexpr-dbg - Fast numerical array expression evaluator for Python 3 and NumPy (debug ext)
python3-pyproj - Python 3 interface to PROJ.4 library
python3-scipy - scientific tools for Python 3
python3-scipy-dbg - scientific tools for Python 3 - debugging symbols
python3-tables - hierarchical database for Python3 based on HDF5
python3-tables-dbg - hierarchical database for Python 3 based on HDF5 (debug extension)
python3-tables-lib - hierarchical database for Python3 based on HDF5 (extension)


$ apt-cache search -n ^python3
python3 - interactive high-level object-oriented language (default python3 version)
python3-all - package depending on all supported Python 3 runtime versions
python3-all-dbg - package depending on all supported Python 3 debugging packages
python3-all-dev - package depending on all supported Python 3 development packages
python3-amqp - Low-level AMQP client (Python3 version)
python3-apparmor - AppArmor Python3 utility library
python3-apparmor-click - Click manifest to AppArmor easyprof conversion tools
python3-apport - Python 3 library for Apport crash report handling
python3-apt - Python 3 interface to libapt-pkg
python3-apt-dbg - Python 3 interface to libapt-pkg (debug extension)
python3-aptdaemon - Python 3 m[...]

Antwort2

Python 3-Pakete haben das Präfix "python3". Für Numpy und Matplotlib installieren Siepython3-numpyUndpython3-matplotlib.

verwandte Informationen