I have downloaded a repo from github and am trying to install the requirements in a venv. It’s telling me freetype and libpng libraries are missing, so I went to the websites and installed them. However I’m still being told they’re missing. (after restarting of course)
Here’s the error in the log:
Collecting matplotlib==2.2.2
Using cached matplotlib-2.2.2.tar.gz (37.3 MB)
ERROR: Command errored out with exit status 1:
command: 'c:programmingpythonexample programsdeepfakevenvscriptspython.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\garym\AppData\Local\Temp\pip-install-ppn3h81t\matplotlib\setup.py'"'"'; __file__='"'"'C:\Users\garym\AppData\Local\Temp\pip-install-ppn3h81t\matplotlib\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:UsersgarymAppDataLocalTemppip-install-ppn3h81tmatplotlibpip-egg-info'
cwd: C:UsersgarymAppDataLocalTemppip-install-ppn3h81tmatplotlib
Complete output (61 lines):
============================================================================
Edit setup.cfg to change the build options
BUILDING MATPLOTLIB
matplotlib: yes [2.2.2]
python: yes [3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019,
19:21:23) [MSC v.1916 32 bit (Intel)]]
platform: yes [win32]
REQUIRED DEPENDENCIES AND EXTENSIONS
numpy: yes [not found. pip may install it below.]
install_requires: yes [handled by setuptools]
libagg: yes [pkg-config information for 'libagg' could not
be found. Using local copy.]
freetype: no [The C/C++ header for freetype
(freetype2ft2build.h) could not be found. You may
need to install the development package.]
png: no [The C/C++ header for png (png.h) could not be
found. You may need to install the development
package.]
qhull: yes [pkg-config information for 'libqhull' could not
be found. Using local copy.]
OPTIONAL SUBPACKAGES
sample_data: yes [installing]
toolkits: yes [installing]
tests: no [skipping due to configuration]
toolkits_tests: no [skipping due to configuration]
OPTIONAL BACKEND EXTENSIONS
macosx: no [Mac OS-X only]
qt5agg: no [PySide2 not found; PyQt5 not found]
qt4agg: no [PySide not found; PyQt4 not found]
gtk3agg: no [Requires pygobject to be installed.]
gtk3cairo: no [Requires cairocffi or pycairo to be installed.]
gtkagg: no [Requires pygtk]
tkagg: yes [installing; run-time loading from Python Tcl /
Tk]
wxagg: no [requires wxPython]
gtk: no [Requires pygtk]
agg: yes [installing]
cairo: no [cairocffi or pycairo not found]
windowing: yes [installing]
OPTIONAL LATEX DEPENDENCIES
dvipng: no
ghostscript: no
latex: no
pdftops: no
OPTIONAL PACKAGE DATA
dlls: no [skipping due to configuration]
============================================================================
* The following required packages can not be built:
* freetype, png
* Please check http://gnuwin32.sourceforge.net/packa
* ges/freetype.htm for instructions to install
* freetype
* Please check http://gnuwin32.sourceforge.net/packa
* ges/libpng.htm for instructions to install png
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
It’s the same problem as here:
Matplotlib install issues. Pip Centos – Freetype "Missing" when it is installed
However I’m on Windows so that solution doesn’t work.
I believe the solution is saying that this user need to install the freetype development headers, are these the same as the “sources,” ie the optional part of installing freetype? If so, I have downloaded them but have no idea where to put them. There’s manifest
and src
directories.
2
Answers
Answered in comments by FlyingTeller. Solution was to just use a Python 3.7 64-bit venv.
Installing libfontconfig1-dev as per https://github.com/r-lib/systemfonts/issues/50#issue-706648329
did take me pass this!