Hi Peter,
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.
Regards,
Jon
···
Date: Thu, 7 Mar 2019 11:36:09 +0000
From: Peter Chiu - UKRI STFC <peter.chiu at stfc.ac.uk>
To: "matplotlib-users at python.org" <matplotlib-users at python.org>
Subject: [Matplotlib-users] Matplotlib Installation Question on Centos
7
Message-ID: <f9072eaff66a4015b6117b295bc06da3 at stfc.ac.uk>
Content-Type: text/plain; charset="us-ascii"Hello,
This is a novice question and hopefully someone can advise.
In order to support a software package for the LOFAR project,
I am trying to install Matplotlib on a centos 7 system:python setup.py build_ext
--include-dirs=/usr/local/lofar3_2/local/release/includeit complains at the point:
g++ -pthread -shared build/temp.linux-x86_64-2.7/src/_ttconv.o \
build/temp.linux-x86_64-2.7/ttconv/pprdrv_tt.o \
build/temp.linux-x86_64-2.7/ttconv/pprdrv_tt2.o \
build/temp.linux-x86_64-2.7/ttconv/ttutil.o \
-L/usr/local/lib -L/usr/lib -L/usr/local/lib64 -L/usr/lib64 \
-L/usr/local/lofar3_2/local/release/lib -lpython2.7 \
-o build/lib.linux-x86_64-2.7/matplotlib/ttconv.so
/usr/local/lib/libpython2.7.a(posixmodule.o): In function `posix_tmpnam':
/usr/local/lofar/python/src/Python-2.7.8/./Modules/posixmodule.c:7575:
warning:
the use of `tmpnam_r' is dangerous, better use `mkstemp'
/usr/local/lib/libpython2.7.a(posixmodule.o): In function `posix_tempnam':
/usr/local/lofar/python/src/Python-2.7.8/./Modules/posixmodule.c:7522:
warning:
the use of `tempnam' is dangerous, better use `mkstemp'
/usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): \
relocation R_X86_64_32 against `.rodata.str1.8' can not be used when
making a shared object; recompile with -fPIC
...
/usr/bin/ld: /usr/local/lib/libpython2.7.a(getcompiler.o): \
relocation R_X86_64_32 against `.rodata.str1.8' can not be used when
making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
error: command 'g++' failed with exit status 1Prior to that, I have already installed a local version of python in a
separate folder.
If I then manually move the switch-L/usr/local/lofar3_2/local/release/lib \
before
-L/usr/local/lib
it will then pick up the local library, and it will compile okay.
So my question is how to specify a local version of python library
to be used as preference as part of the python setup.py build_ext command.I have tried the switch -library-dirs=..., --library=, and -rpath=
but none of them will make my local python library in preference
to that under /usr/local/lib.Much grateful for any advice can be given.
Regards,
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <
http://mail.python.org/pipermail/matplotlib-users/attachments/20190307/dda2ef24/attachment-0001.html
>------------------------------
Subject: Digest Footer
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users at python.org
Matplotlib-users Info Page------------------------------
End of Matplotlib-users Digest, Vol 44, Issue 3
***********************************************
--
Jonathan D. Slavin
Astrophysicist - High Energy Astrophysics Division
Center for Astrophysics | Harvard & Smithsonian
Office: (617) 496-7981 | Cell: (781) 363-0035
60 Garden Street | MS 83 | Cambridge, MA 02138
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20190307/a76c28bc/attachment.html>