'pip install'을 실행하는 Ubuntu에서 '다음 필수 패키지를 빌드할 수 없습니다: *freetype' 오류가 발생함
수행 시pip install -r requirements.txt
설치 단계에서 다음 오류가 발생합니다.matplotlib
:
REQUIRED DEPENDENCIES AND EXTENSIONS
numpy: yes [not found. pip may install it below.]
dateutil: yes [dateutil was not found. It is required for date
axis support. pip/easy_install may attempt to
install it after matplotlib.]
tornado: yes [tornado was not found. It is required for the
WebAgg backend. pip/easy_install may attempt to
install it after matplotlib.]
pyparsing: yes [pyparsing was not found. It is required for
mathtext support. pip/easy_install may attempt to
install it after matplotlib.]
pycxx: yes [Couldn't import. Using local copy.]
libagg: yes [pkg-config information for 'libagg' could not
be found. Using local copy.]
freetype: no [pkg-config information for 'freetype2' could
not be found.]
...
The following required packages can not be built:
* freetype
해선 안된다pip install -r requirements.txt
무료 유형도 설치하시겠습니까?Ubuntu 12.04에서 자유형을 설치하여 작동하는 방법matplotlib
?
아니요.pip
시스템 수준 종속성을 설치하지 않습니다.이것은 의미합니다.pip
RPM(Redhat 기반 시스템) 또는 DEB(Debian 기반 시스템)를 설치하지 않습니다.
시스템 종속성을 설치하려면 시스템에 따라 다음 방법 중 하나를 사용해야 합니다.
Ubuntu/데비안:
apt-get install libfreetype6-dev
Ubuntu/Debian 기반 시스템에서 패키지 검색하기
apt-cache search <string>
예:
apt-cache search freetype | grep dev
Redhat/CentOS/Fedora:
yum -y install freetype-devel
Redhat/CentOS/Fedora 기반 시스템에서 패키지를 검색하려면:
yum search <string>
예:
yum search freetype | grep devel
Mac OS X: (홈브루를 통해)
brew install freetype
Mac OS X 기반 시스템에서 패키지를 검색하는 방법
brew search <string>
예:
brew search freetype
Ubuntu 서버 14.04에서 matplotlib을 활성화하기 위해 libxft-dev를 설치해야 했습니다.
sudo apt-get install libfreetype6-dev libxft-dev
그리고 나서 나는
sudo easy_install matplotlib
해결 방법은 다음과 같습니다.sudo apt-get install pkg-config
제가 이 github 호에서 발견한 것입니다.
Ubuntu에서 matplotlib을 업그레이드할 수 있는 기존 답변이 없었습니다.이것이 궁극적으로 제게 도움이 되는 것입니다.
$ sudo apt-get install build-dep python-matplotlib
$ pip install matplotlib --upgrade
이 명령은 모든 종속성을 다운로드합니다.
python 2.x의 경우
sudo apt-get install python-matplotlib
python 3.x의 경우
sudo apt-get install python3-matplotlib
설치한 후에는
(sudo) pip install matplotlib
Ubuntu에서 설치한 후 작동했습니다.blt-dev
꾸러미
$sudo apt-get install blt-dev
$pip install matplotlib
저는 Mint를 사용하고 있습니다. 이 답변들은 저에게 효과가 없었습니다. 저는 다음과 같이 해야 했습니다.
sudo apt-get install build-essential g++
Windows에서 Python 3.6과 동일한 문제가 있었지만 Python 3.5.2로 전환하면 모든 것이 정상적으로 작동합니다.
이 명령어sudo apt-get install libfreetype6-dev
Ubuntu 16.04에서 실패했습니다.
The following packages have unmet dependencies: libfreetype6-dev : Depends: libfreetype6 (= 2.6.1-0.1ubuntu2) but 2.6.1-0.1ubuntu2.3 is to be installed
그래서 소스에서 설치된 무료 유형을 다운로드했습니다. 이 가이드에 대한 크레딧입니다.
$ tar -xvjf freetype-x.y.tar.bz2 # extract the downloaded version file
$ cd freetype-x.y/
$ ./configure
$ make
$ sudo make install
가상 환경으로 전환 및pip install matplotlib
모든 것이 작동하고 있습니다.
저는 프리타입을 설치하기 위해 제임스 밀스의 답변을 따랐습니다.그러나 여전히 프리타입이 설치되었지만 프로그램은 여전히 실패하고 있었습니다.프로그램이 자유형의 길을 찾지 못했기 때문이라고 생각합니다.다음 명령은 문제를 해결했습니다.
sudo apt-get install pkg-config
https://github.com/matplotlib/matplotlib/issues/3029/ 에서 이 솔루션을 찾았습니다.
언급URL : https://stackoverflow.com/questions/20533426/ubuntu-running-pip-install-gives-error-the-following-required-packages-can-no
'programing' 카테고리의 다른 글
Python 클래스 정의 구문 (0) | 2023.07.17 |
---|---|
matplotlib에서 x축을 그래프의 맨 위로 이동 (0) | 2023.07.17 |
Python에서 점과 쉼표가 있는 문자열을 플로트로 변환하려면 어떻게 해야 합니까? (0) | 2023.07.17 |
날짜 문자열을 다른 형식으로 변환하는 방법 (0) | 2023.07.17 |
모든 Mongo 컬렉션을 루프하고 쿼리 실행 (0) | 2023.07.17 |