-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
freetype cannot be found by build #3029
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can you provide any more details (distribution, version etc)? |
Linux: Ubuntu 14.04 LTS Libraries: libfreetype6:amd64 2.5.2-1ubuntu2 Matplotlib matplotlib==1.3.1 (from pip) I've checked the |
I can not reproduce this in a virtual environment on 14.04. |
It looks similar to #2623. Even if it is not the same issue, are there plans for 1.3.2? :) |
I have the same problem. I try to install matplotlib in a virtual environment on ubuntu server 14.04. freetype-devel has been installed (package
But matplotlib does not find it. |
@espdev What version of mpl? |
@tacaswell Version 1.3.1 from PyPI. |
A temporary fix would be to create a symlink before installing matplotlib using pip.
|
I found the same issue on Debian unstable with Matplotlib 1.3.1 (both from PyPI and the tag release on github - although I think they're the same). The fix by @razius at https://github.com/razius/matplotlib/commit/66ee42d194bef1d045918c54cc81a9cb186bd440 works for me and I managed to install matplotlib from source after applying the same patch to |
Never mind; upon further investigation, this is unrelated to #2623. This bug only occurs if pkg-config is not installed; a simple sudo apt-get install pkg-config will shore up the include paths for now. |
Same here. sudo apt-get install pkg-configdid the trick |
Same here - |
The pkg-config package needs to be installed, else `pip install -r requirements.txt` will fail when installing matplotlib. See matplotlib/matplotlib#3029 and https://github.com/brucellino/zenodo-docker-role/issues/3
Same here... principle error message is
I tried
but the command return 0 installed/updated and nevertheless didn't solve my problem. |
Same here with OS X 10.10.3 fixed with
|
@llazzaro This is documented in https://github.com/matplotlib/matplotlib/blob/master/README.osx but says to use attn @jenshnielsen |
Both should work. But pkg-config is the correct name and pgkconfig is an alias see https://github.com/Homebrew/homebrew/blob/master/Library/Aliases/pkgconfig |
worked for me! |
@benesch thanks for the post - it worked. How did you find out what was the reason? |
@khazamov it's been a year, but IIRC I went source spelunking and noticed the hardcoded path to the freetype header was incorrect for OS X. Luckily pkg-config is capable of detecting freetype, and matplotlib prefers pkg-config's advice over the hardcoded path. |
Thanks for the link. If the installation script can't suggest installing pkg-config (if it is not installed) when failing to find freetype then perhaps the documentation could suggest this. E.g., in the Building on Linux you could add a note like If the freetype developer package is installed by the system package manager but not found when installing matplotlib, try installing pkg-config, a tool used to find required non-python libraries. |
@scott-vsi Can you put in a Pull request adding that text where you would expect to have found it? |
@tacaswell I would really prefer having the installation script check for pkg-config instead. I can try to put in a PR for that if you'd like. I believe most users would try to install matplotlib via either pip or the system package manager, encounter the error, google for the error and then end up here. Having the installation check for pkg-config seems like a cleaner solution to me. |
I agree that is better. I did a pull request for the interim if you want. |
sudo apt-get install pkg-config |
brew install pkgconfig But i still can't install matplotlib More about this issue: http://stackoverflow.com/questions/36341660/python-pip-install-exception-matplotlib Should I open a new issue ? |
@calebebrim Did you actually install freetype?
Freetype is a dependency of matplotlib and needs to be installed for matplotlib to build. pkg-config only helps locate it. |
- libfreetype6-dev satisfies the freetype requirement. - pkg-config addresses freetype detection by matplotlib (see matplotlib/matplotlib#3029).
I'm having this problem on Windows 10, building matplotlib 1.5.1 for Python 2.7.11. I'm using the conda package manager. "conda build matplotlib" errors out with
freetype is installed. ft2build.h is present. There is no pkg-config for Windows. This seems like a real matplotlib config bug that is being covered over by punting to pkg-config. Wish it could be fixed. |
@janssen I suggest you send this issue to the user mailing list ([email protected] which will require you to register to post un-moderated) or have a look at our appveyor configuration files (which build mpl in a conda env on windows). |
Same problem here, |
@razius
|
Have this issue on ubuntu 16.04, python 3.5.2 (virtualenv), matplotlib 1.5.1 (installed via pip). |
Then
Which, by the way, is exactly the only error that the output is clearly saying. |
If you are using docker, and install matplotlib in
|
If you're installing matplotlib in windows.
|
In termux solve by:
|
Downloading https://files.pythonhosted.org/packages/26/04/8b381d5b166508cc258632b225adbafec49bbe69aa9a4fa1f1b461428313/matplotlib-3.0.3.tar.gz (36.6MB)
ERROR: Command erred out with exit status 1: python setup.py egg_info Check the logs for full command output. on raspbian stretch sudo apt install libpng12-0 libpng12-dev libpng-tools libfreetype6-dev *not yet done yet pip3 still glitching installing pymzq & kiwisolver |
@marxenegls Can you open a topic at https://discourse.matplotlib.org/c/community/install for installing Matplotlib on rasbian? |
I also encountered this problem in openEuler release 20.03 (LTS-SP1). |
Summarizing my experience + solution in case it helps anyone... I encountered this error while pip installing matplotlib from a requirements.txt in a Docker image. In particular, I requested a specific older version of matplotlib (3.4.3) while also simultaneously installing/requesting the most recent version of Python (3.10), torch, etc. Turns out pip will attempt to compile a packages on its own if it can't find a pre-compiled version in the public repositories. In my case, the slim Docker image didn't have the build tools necessary for pip to compile -> the freetype error. The solution was simple: update the version of matplotlib i was requesting to one available pre-compiled. |
I've tried to install
matplotlib
usingpip
on Linux and it couldn't findfreetype
during the build process, even though it's installed with dev packages.But:
And:
The text was updated successfully, but these errors were encountered: