|
How do I install Python 2.7 with Unix libraries on Cygwin? Obviously getting Python 2.6 is easy - just install the Cygwin package with setup.exe. Installing the Windows version of Python 2.7 was also easy, but I could not access the Unix modules.
Related: easy pip install matplotlib without compiling
Matplotlib Cygwin manual compile
This method is NOT normally needed.Just
python3 -m pip install matplotlib
normally.Matplotlib requires Python 3.- at Windows Command Prompt:
- at Cygwin Terminal:
Alternative: Matplotlib compile
You can just use the process above, unless you want to compile Matplotlib on Cygwin from source code for the latest Matplotlib beta.
Test
![Python Python](/uploads/1/2/5/2/125289852/538664177.jpg)
It’s important to actually try to make a figure, not just
import matplotlib
as some errors only occur when the libraries are actually invoked.This may not open a visible figure unless X11 is started as noted in the section below.
visible figures
To create visible Matplotlib figures in Cygwin, start the X11 system by:
- Windows Start button → All App → Cygwin-X → Openbox.
- Openbox desktop: Right click → Terminals → Xterm.
Test the Matplotlib / Cygwin-X / Openbox configuration from the Cygwin X11 Openbox Xterm terminal:
Save figures
Even without the X11 desktop, create and save invisible figures to
.eps
, .png
, .svg
, etc. by using savefig()
.