<div dir="ltr">I sometimes take a blunter approach, install Matplotlib via conda and then uninstall it which leaves behind the dependencies ;)<div><br></div><div>Tom</div></div><br><div class="gmail_quote"><div dir="ltr">On Sat, Aug 5, 2017 at 5:33 PM Klymak Jody <<a href="mailto:jklymak@uvic.ca">jklymak@uvic.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>Hi Chris.  Thanks so much. That'll be useful</div><div id="m_-8000230526358229163AppleMailSignature"><br></div><div id="m_-8000230526358229163AppleMailSignature">I think I was partially tricked by the fact that %matplotlib notebook wasn't working for master in a Jupiter notebook.   but I see now that it doesn't wrk for anyone so I guess I was installing things adequately ;-)</div><div id="m_-8000230526358229163AppleMailSignature"><br></div><div id="m_-8000230526358229163AppleMailSignature">Thanks again.   Jody</div><div id="m_-8000230526358229163AppleMailSignature"><br>Sent from my iPhone</div></div><div dir="auto"><div><br>On Aug 5, 2017, at 14:22, Chris Barker <<a href="mailto:chris.barker@noaa.gov" target="_blank">chris.barker@noaa.gov</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr"><div>This should be pretty straightforward, but MPL's dependencie are pretty complex. IN thoery, simplyL<br><br></div><div>1) create an environment<br></div><div>2) install the dev dependencies<br></div><div>3) build away.<br></div><div><br></div><div>but in fact, step (2) there is not so straightforward, so here we go...<br></div><br><div>1) I recommend using conda-forge as a source of packages -- it is more up to date than defaults, and you are developing....<br><br></div><span style="font-family:monospace,monospace">conda config --add channels conda-forge</span><br><br><div class="gmail_extra">2)  create an environment for doing your development:<br><br></div><div class="gmail_extra"><span style="font-family:monospace,monospace">conda create -n mpl-dev python=3<br></span></div><div class="gmail_extra"><br></div><div class="gmail_extra">3) activate that environment:<br><br></div><div class="gmail_extra"><span style="font-family:monospace,monospace">source activate mpl-dev</span><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">4) install the requirements of mpl:<br><br></div><div class="gmail_extra">OK -- this one is kinda messy for MPL. It has a lot of requirements that depend someone on which sub-packages you are going to build.<br><br></div><div class="gmail_extra">but first you need pk-config, which MPL used to find/configure stuff on *nix systems.<br><br></div><div class="gmail_extra">(you may have this from Brew already)<br><br></div><div class="gmail_extra"><span style="font-family:monospace,monospace">conda install pkg-config<br></span></div><div class="gmail_extra"><br></div><div class="gmail_extra"><span style="font-family:monospace,monospace">python setup.py --requires</span> doesn't work, as mpl does a lot of ative configuration.<br><br></div><div class="gmail_extra">but:<br><br></div><div class="gmail_extra"><span style="font-family:monospace,monospace">python ./setup.py dry-run</span><br><br>will get you a good list:<br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><span style="font-family:monospace,monospace">REQUIRED DEPENDENCIES AND EXTENSIONS<br>                 numpy: yes [not found. pip may install it below.]<br>                   six: yes [six was not found.pip will attempt to install<br>                        it after matplotlib.]<br>              dateutil: yes [dateutil was not found. It is required for date<br>                        axis support. pip/easy_install may attempt to<br>                        install it after matplotlib.]<br>backports.functools_lru_cache: yes [Not required]<br>          subprocess32: yes [Not required]<br>                  pytz: yes [pytz was not found. pip/easy_install may<br>                        attempt to install it after matplotlib.]<br>                cycler: yes [cycler was not found. pip/easy_install may<br>                        attempt to install it after matplotlib.]<br>               tornado: yes [tornado was not found. It is required for the<br>                        WebAgg backend. pip/easy_install may attempt to<br>                        install it after matplotlib.]<br>             pyparsing: yes [pyparsing was not found. It is required for<br>                        mathtext support. pip/easy_install may attempt to<br>                        install it after matplotlib.]<br>                libagg: yes [pkg-config information for 'libagg' could not<br>                        be found. Using local copy.]<br>              freetype: no  [The C/C++ header for freetype2 (ft2build.h)<br>                        could not be found.  You may need to install the<br>                        development package.]<br>                   png: yes [version 1.6.26]<br>                 qhull: yes [pkg-config information for 'libqhull' could not<br>                        be found. Using local copy.]<br></span><br></div><div class="gmail_extra">you don't want pip to try to install anything, so I created a requirements file (enclosed)<br><br></div><div class="gmail_extra"><span style="font-family:monospace,monospace">conda install --file conda_requirements_dev.txt<br></span><br></div><div class="gmail_extra">And now you should be able to build!<br><br></div><div class="gmail_extra"><span style="font-family:monospace,monospace">python setup.py build</span><br><br></div><div class="gmail_extra">Note that you won't get all the back-ends -- other dependencies need to be installed for that.<br><br></div><div class="gmail_extra">BTW: it would be nice to have something like that <span style="font-family:monospace,monospace">conda_requirements_dev.txt</span>  in the MPL repo -- the setup-tools stuff is way to tied into the build/packaging/installing system.<br><br></div><div class="gmail_extra">HTH,<br><br></div><div class="gmail_extra">-CHB<br><br><br></div><div class="gmail_quote">On Tue, Jun 13, 2017 at 6:24 AM, Jody Klymak <span dir="ltr"><<a href="mailto:jklymak@gmail.com" target="_blank">jklymak@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




<div>
<div style="font-family:sans-serif"><div style="white-space:normal"><p dir="auto">      <br>
Hi all,</p>
<p dir="auto">I’m somewhat stymied trying to understand how to install matplotlib in a development environment using conda.</p>
<p dir="auto">I have MacOS, and I have brew gcc etc.  I know how to set up a env in conda.</p>
<p dir="auto">I eventually want to be able to run the tests, so that I can stop uploading things with PEP8 errors etc. </p>
<p dir="auto">Sorry if this is too vague.  I can start over again and send specific errors if that is easier, but I would bet someone has a step-by-step.</p>
<p dir="auto">Thanks,   Jody</p>
</div>
</div>
</div>

<br>_______________________________________________<br>
Matplotlib-devel mailing list<br>
<a href="mailto:Matplotlib-devel@python.org" target="_blank">Matplotlib-devel@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/matplotlib-devel" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/matplotlib-devel</a><br>
<br></blockquote></div><div class="gmail_extra"><br><br clear="all"><br>-- <br><div class="m_-8000230526358229163gmail-m_3394902967790622900gmail_signature"><br>Christopher Barker, Ph.D.<br>Oceanographer<br><br>Emergency Response Division<br>NOAA/NOS/OR&R            <a href="tel:%28206%29%20526-6959" value="+12065266959" target="_blank">(206) 526-6959</a>   voice<br>7600 Sand Point Way NE   <a href="tel:%28206%29%20526-6329" value="+12065266329" target="_blank">(206) 526-6329</a>   fax<br>Seattle, WA  98115       <a href="tel:%28206%29%20526-6317" value="+12065266317" target="_blank">(206) 526-6317</a>   main reception<br><br><a href="mailto:Chris.Barker@noaa.gov" target="_blank">Chris.Barker@noaa.gov</a></div>
</div></div>
</div></blockquote></div><div dir="auto"><blockquote type="cite"><div><conda_requirements_dev.txt></div></blockquote></div><div dir="auto"><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Matplotlib-devel mailing list</span><br><span><a href="mailto:Matplotlib-devel@python.org" target="_blank">Matplotlib-devel@python.org</a></span><br><span><a href="https://mail.python.org/mailman/listinfo/matplotlib-devel" target="_blank">https://mail.python.org/mailman/listinfo/matplotlib-devel</a></span><br></div></blockquote></div>_______________________________________________<br>
Matplotlib-devel mailing list<br>
<a href="mailto:Matplotlib-devel@python.org" target="_blank">Matplotlib-devel@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/matplotlib-devel" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/matplotlib-devel</a><br>
</blockquote></div>