태그 보관물: apt

apt

Ubuntu 16.04에 scipy와 numpy를 설치하는 방법은 무엇입니까? 설치하려고하는데 다음과

우분투 16.04에 scipy와 numpy를 설치하려고하는데 다음과 같은 오류가 계속 발생합니다. 누구든지 종속성을 설치하는 방법을 말해 줄 수 있습니까?

Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python-numpy : Depends: python:any (>= 2.7.5-5~)
 E: Unable to correct problems, you have held broken packages.


답변

pip (대체 Python 패키지 설치 프로그램)를 사용하여 전체 시스템에 numpy 및 scipy를 설치할 수도 있습니다.

sudo apt-get install python-pip
sudo pip install numpy scipy

Ubuntu 패키지 관리자의 종속성 오류에 관계없이 설치할 수 있습니다.


답변

현재 지원되는 모든 Ubuntu 버전에 종속성을 설치하려면 터미널을 열고 다음 명령을 입력하십시오.

sudo apt update
sudo apt install --no-install-recommends python2.7-minimal python2.7
sudo apt install python-numpy python-scipy

Python 3.x의 경우

sudo apt update
sudo apt install --no-install-recommends python3-minimal python3
sudo apt install python3-numpy python3-scipy

답변

필자의 경우 전 세계 대신 가상 환경에 scipy를 설치하고 싶었습니다. pip 설치 전에 libatlas-base-dev 및 gfortran을 설치하면 문제가 해결되었습니다.

sudo apt-get install libatlas-base-dev
sudo apt-get install gfortran
source .venv/bin/activate
pip install scipy

답변