<div dir="ltr"><div dir="ltr">The patch at <a href="https://github.com/matplotlib/matplotlib/pull/13064">https://github.com/matplotlib/matplotlib/pull/13064</a> will likely not work on old matplotlibs/py2, but perhaps patching get_base_dirs to return an empty list (as suggested in <a href="https://github.com/matplotlib/matplotlib/issues/9737">https://github.com/matplotlib/matplotlib/issues/9737</a>) (and then fixing any downstream breakage) will...<br></div><div>Antony</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 13, 2019 at 2:23 PM Thomas Caswell <<a href="mailto:tcaswell@gmail.com">tcaswell@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>Can you use the local version of python to run setup.py?  It is not clear to me what version of python you are compiling with.<br></div><div><br></div><div>Does the patch in <a href="https://github.com/matplotlib/matplotlib/pull/13064" target="_blank">https://github.com/matplotlib/matplotlib/pull/13064</a> help?<br><div><br></div><div>Failing that, as it looks like you are building matplotlib as part of an integrated enviroment, I suggest patching `setup.py` and `setup_ext.py` until it works...</div></div><div><br></div><div>Tom</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 7, 2019 at 12:13 PM Slavin, Jonathan <<a href="mailto:jslavin@cfa.harvard.edu" target="_blank">jslavin@cfa.harvard.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small">Hi Peter,</div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small">I'm working on a CentOS 7 system. I can't answer your question directly, but I would advise installing anaconda. It makes all this stuff much simpler and keeps your local environment cleanly separated from the system wide one.</div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small">Regards,</div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small">Jon</div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Date: Thu, 7 Mar 2019 11:36:09 +0000<br>
From: Peter Chiu - UKRI STFC <<a href="mailto:peter.chiu@stfc.ac.uk" target="_blank">peter.chiu@stfc.ac.uk</a>><br>
To: "<a href="mailto:matplotlib-users@python.org" target="_blank">matplotlib-users@python.org</a>" <<a href="mailto:matplotlib-users@python.org" target="_blank">matplotlib-users@python.org</a>><br>
Subject: [Matplotlib-users] Matplotlib Installation Question on Centos<br>
        7<br>
Message-ID: <<a href="mailto:f9072eaff66a4015b6117b295bc06da3@stfc.ac.uk" target="_blank">f9072eaff66a4015b6117b295bc06da3@stfc.ac.uk</a>><br>
Content-Type: text/plain; charset="us-ascii"<br>
<br>
Hello,<br>
<br>
This is a novice question and hopefully someone can advise.<br>
<br>
In order to support a software package for the LOFAR project,<br>
I am trying to install Matplotlib on a centos 7 system:<br>
<br>
   python setup.py build_ext --include-dirs=/usr/local/lofar3_2/local/release/include<br>
<br>
it complains at the point:<br>
<br>
g++ -pthread -shared build/temp.linux-x86_64-2.7/src/_ttconv.o \<br>
build/temp.linux-x86_64-2.7/ttconv/pprdrv_tt.o   \<br>
build/temp.linux-x86_64-2.7/ttconv/pprdrv_tt2.o \<br>
build/temp.linux-x86_64-2.7/ttconv/ttutil.o           \<br>
-L/usr/local/lib -L/usr/lib -L/usr/local/lib64 -L/usr/lib64 \<br>
-L/usr/local/lofar3_2/local/release/lib -lpython2.7 \<br>
-o build/lib.linux-x86_64-2.7/matplotlib/ttconv.so<br>
/usr/local/lib/libpython2.7.a(posixmodule.o): In function `posix_tmpnam':<br>
/usr/local/lofar/python/src/Python-2.7.8/./Modules/posixmodule.c:7575: warning:<br>
the use of `tmpnam_r' is dangerous, better use `mkstemp'<br>
/usr/local/lib/libpython2.7.a(posixmodule.o): In function `posix_tempnam':<br>
/usr/local/lofar/python/src/Python-2.7.8/./Modules/posixmodule.c:7522: warning:<br>
the use of `tempnam' is dangerous, better use `mkstemp'<br>
/usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): \<br>
relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC<br>
...<br>
/usr/bin/ld: /usr/local/lib/libpython2.7.a(getcompiler.o): \<br>
relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC<br>
/usr/bin/ld: final link failed: Nonrepresentable section on output<br>
collect2: error: ld returned 1 exit status<br>
error: command 'g++' failed with exit status 1<br>
<br>
Prior to that, I have already installed a local version of python in a separate folder.<br>
If I then manually move the switch<br>
<br>
-L/usr/local/lofar3_2/local/release/lib \<br>
<br>
before<br>
<br>
-L/usr/local/lib<br>
<br>
it will then pick up the local library, and it will compile okay.<br>
<br>
So my question is how to specify a local version of python library<br>
to be used as preference as part of the python setup.py build_ext command.<br>
<br>
I have tried the switch -library-dirs=..., --library=, and -rpath=<br>
but none of them will make my local python library in preference<br>
to that under /usr/local/lib.<br>
<br>
Much grateful for any advice can be given.<br>
<br>
Regards,<br>
<br>
Peter<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://mail.python.org/pipermail/matplotlib-users/attachments/20190307/dda2ef24/attachment-0001.html" rel="noreferrer" target="_blank">http://mail.python.org/pipermail/matplotlib-users/attachments/20190307/dda2ef24/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
Matplotlib-users mailing list<br>
<a href="mailto:Matplotlib-users@python.org" target="_blank">Matplotlib-users@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/matplotlib-users" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/matplotlib-users</a><br>
<br>
<br>
------------------------------<br>
<br>
End of Matplotlib-users Digest, Vol 44, Issue 3<br>
***********************************************<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_-4310897146544934119gmail-m_2963618979846884747gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><img width="350" height="2" style="font-size: 12.6667px; font-family: Arial; white-space: pre-wrap; border: none;"></div><div dir="ltr">Jonathan D. Slavin</div><div dir="ltr">Astrophysicist - High Energy Astrophysics Division</div><div dir="ltr">Center for Astrophysics | Harvard & Smithsonian</div><div dir="ltr">Office: (617) 496-7981 | Cell: (781) 363-0035<br>60 Garden Street | MS 83 | Cambridge, MA 02138</div></div><div dir="ltr"><span><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:9.5pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><img width="350" height="2" style="border: none;"></span><span style="font-size:9.5pt;font-family:Arial;background-color:transparent;vertical-align:baseline;white-space:pre-wrap"><br></span></p></span></div></div></div></div></div></div></div></div>
_______________________________________________<br>
Matplotlib-users mailing list<br>
<a href="mailto:Matplotlib-users@python.org" target="_blank">Matplotlib-users@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/matplotlib-users" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/matplotlib-users</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_-4310897146544934119gmail_signature">Thomas Caswell<br><a href="mailto:tcaswell@gmail.com" target="_blank">tcaswell@gmail.com</a></div>
_______________________________________________<br>
Matplotlib-users mailing list<br>
<a href="mailto:Matplotlib-users@python.org" target="_blank">Matplotlib-users@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/matplotlib-users" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/matplotlib-users</a><br>
</blockquote></div>