@@ -174,10 +174,35 @@ etc., you can install the following:
174
174
175
175
.. note ::
176
176
177
- Matplotlib depends on non-Python libraries. `pkg-config
178
- <https://www.freedesktop.org/wiki/Software/pkg-config/> `_ can be used
179
- to find required non-Python libraries and thus make the install go more
180
- smoothly if the libraries and headers are not in the expected locations.
177
+ Matplotlib depends on non-Python libraries.
178
+
179
+ On Linux and OSX, pkg-config _ can be used to find required non-Python
180
+ libraries and thus make the install go more smoothly if the libraries and
181
+ headers are not in the expected locations.
182
+
183
+ .. _pkg-config : https://www.freedesktop.org/wiki/Software/pkg-config/
184
+
185
+ If not using pkg-config (in particular on Windows), you may need to set the
186
+ include path (to the FreeType, libpng, and zlib headers) and link path (to
187
+ the FreeType, libpng, and zlib libraries) explicitly, if they are not in
188
+ standard locations. This can be done using standard environment variables
189
+ -- on Linux and OSX:
190
+
191
+ .. code-block :: sh
192
+
193
+ export CFLAGS=' -I/directory/containing/ft2build.h ...'
194
+ export LDFLAGS=' -L/directory/containing/libfreetype.so ...'
195
+
196
+ and on Windows:
197
+
198
+ .. code-block :: bat
199
+
200
+ set CL = /IC:\directory\containing\ft2build.h ...
201
+ set LINK = /LIBPATH:C:\directory\containing\freetype.lib ...
202
+
203
+ where ``... `` means "also give, in the same format, the directories
204
+ containing ``png.h `` and ``zlib.h `` for the include path, and for
205
+ ``libpng.so ``/``png.lib `` and ``libz.so ``/``z.lib `` for the link path."
181
206
182
207
.. note ::
183
208
0 commit comments