programing

'pip install'을 실행하는 Ubuntu에서 '다음 필수 패키지를 빌드할 수 없습니다: *freetype' 오류가 발생함

mytipbox 2023. 7. 17. 22:48
반응형

'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시스템 수준 종속성을 설치하지 않습니다.이것은 의미합니다.pipRPM(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-devUbuntu 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

반응형