Python3 모듈

Python3 모듈

저는 최근 Ubuntu 14.04를 설치했고 대학원에서 (텍스트) 데이터 분석을 위해 Python을 사용한 이후로 몇 년 동안 Python 매니아였습니다.

14.04에는 Python 2.7과 3.4가 모두 함께 제공되는 것으로 나타났습니다. 그러나 저장소는 Python 2.7용 Python 모듈만 설치합니다. 기본 "python"이 Python 2.7을 제공할 때 누군가 Python 3.4(특히 numpy 및 matplotlib)용 모듈을 설치하는 단계를 안내해 줄 수 있는지 궁금합니다.

감사해요. 서두르지 말고 대답하세요.

답변1

Bain이 지적했듯이 python3.x 모듈의 접두사는 python3-<pkgname>. 패키지 캐시(사용 가능한 패키지와 설치되지 않은 패키지 포함)를 검색하여 이를 확인할 수 있습니다.

다음은 몇 가지 관련 명령입니다.

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

표현식 ^python3은 'python3'으로 시작하는 패키지로 제한되며 '-n'은 검색을 이름(긴 설명이 아님)으로 제한합니다. 보다 일반적인 검색을 위해 해당 항목을 제거할 수 있습니다.

다음은 몇 가지 샘플 출력입니다.

$ 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[...]

답변2

Python 3 패키지에는 "python3"이라는 접두사가 붙습니다. numpy 및 matplotlib의 경우 설치python3-numpy그리고python3-matplotlib.

관련 정보