tvwenger / maxfield

An Ingress Linking and Fielding Strategy Generator
http://www.ingress-maxfield.com/
GNU General Public License v3.0
107 stars 58 forks source link

freetype not found, although freetype6 is installed #25

Closed mesmerus closed 6 years ago

mesmerus commented 6 years ago

Bad nomenclature aside, I have libfreetype6 (2.6.1-0.1ubuntu2.3) installed, but it seems the requirements file looks strictly for version 2, which isn't in Ubuntu's repositories, having been superseded by newer versions.

The output claims I can edit setup.cfg to change the build options, but there doesn't seem to be a setup.cfg file. Likewise, no version of freetype is specified in requirements.txt and I cannot append freetype==2.6.1 without creating an error:

Collecting freetype==2.6.1 (from -r requirements.txt (line 2)) Could not find a version that satisfies the requirement freetype==2.6.1 (from -r requirements.txt (line 2)) (from versions: ) No matching distribution found for freetype==2.6.1 (from -r requirements.txt (line 2))

Am I missing a way to tell pip I do have freetype installed, or is something else going on here? Freetype seems to be the only required dependency failing, but here is my full log from running the install command.

============================================================================
Edit setup.cfg to change the build options

BUILDING MATPLOTLIB
            matplotlib: yes [1.3.1]
                python: yes [2.7.12 (default, Dec  4 2017, 14:50:18)  [GCC
                        5.4.0 20160609]]
              platform: yes [linux2]

REQUIRED DEPENDENCIES AND EXTENSIONS
                 numpy: yes [version 1.11.0]
              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 [using tornado version 4.5.1]
             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.]
                   png: yes [pkg-config information for 'libpng' could not
                        be found. Using unknown version.]

OPTIONAL SUBPACKAGES
           sample_data: yes [installing]
              toolkits: yes [installing]
                 tests: yes [nose 0.11.1 or later is required to run the
                        matplotlib test suite]

OPTIONAL BACKEND EXTENSIONS
                macosx: no  [Mac OS-X only]
                qt4agg: yes [installing, Qt: 4.8.7, PyQt4: 4.11.4]
               gtk3agg: yes [installing, version 3.9.18]
             gtk3cairo: yes [installing, version 3.9.18]
                gtkagg: no  [The C/C++ header for gtk (gtk/gtk.h) could not
                        be found.  You may need to install the development
                        package.]
                 tkagg: no  [TKAgg requires Tkinter.]
                 wxagg: yes [installing, version 3.0.2.0]
                   gtk: no  [The C/C++ header for gtk (gtk/gtk.h) could not
                        be found.  You may need to install the development
                        package.]
                   agg: yes [installing]
                 cairo: yes [installing, version 1.8.8]
             windowing: no  [Microsoft Windows only]

OPTIONAL LATEX DEPENDENCIES
                dvipng: no
           ghostscript: yes [version 9.18]
                 latex: no
               pdftops: yes [version 0.41.0]

============================================================================
                        * The following required packages can not be built:
                        * freetype

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-p3qziV/matplotlib/`

tvwenger commented 6 years ago

pip would find it if you had it installed. Maybe you don't have the dev version? See this stackoverflow answer:

https://stackoverflow.com/questions/20533426/ubuntu-running-pip-install-gives-error-the-following-required-packages-can-no

mesmerus commented 6 years ago

Jesus Christ, could you have tried to be more snooty?

First of all, I do have it installed -- the exact version I listed. Secondly, no I don't have the dev version -- the dev version is not normally installed except by people doing development work. That begs the question why the dev version is required, or where/how this can be overridden. Which was one of the first things I tried, and you completely glossed over it.

The stack overflow link also does no job of explaining why the dev branch is required, merely stating that pip won't install from apt/deb sources (no shit), and providing example commands to install the dev branch specifically.

The response I got amounted to "You should install the deb branch instead", and having closed the issue without so much as why the dev package is required. That is absolutely the worst response I've ever gotten from anyone on github.

Clearly, you have no idea why the dev build is required, and couldn't care less, having just overtaken it from Mr. Baker, slapping a webfront on it, and not caring further.

For Christ's sake, you could have said "Oh, you actually need the dev build instead", since that isn't listed anywhere in your prerequisites and most people don't just have dev builds installed for no damn reason out of the gate.

Thanks, I guess. I'll just clone the code and fix the issue when I have the time to do so.

tvwenger commented 6 years ago

I’m sorry, I didn’t mean to come off snooty. I am genuinely trying to help, and I’m sure installing the dev version of libfreetype will solve your problem.

The problem you’re having is with installing matplotlib via pip. pip downloads the package data and builds the package in your environment. When pip compiles matplotlib, it needs the necessary header files. One of those header files is part of libfreetype, and the header files are only included in the dev version of libfreetype. As you say, you should only need the dev version if you’re developing, and in this case you are “developing” because you’re compiling software.

Anybody who installs matplotlib, for this application or any other, also needs libfreetype-dev.

Again, I’m sorry for coming off short.

mesmerus commented 6 years ago

I appreciate the change in tone; that was a much nicer way of putting it.

I haven't had time to try the dev package, but assume you're correct. I'll report back if it doesn't fix the issue when I next look at it.

If I may make a suggestion, that should be in the requirements listing. I personally wasn't expecting pip to compile matplotlib, as I assumed the images were just an overlay with imagemagik or such. That may prevent additional confusion in the future. :)