Date: Mon, 4 Jan 2016 23:59:13 +0000 From: Olivier Duchateau <duchateau.olivier@gmail.com> To: "Mikhail T." <mi+thun@aldan.algebra.com> Cc: python@FreeBSD.org Subject: Re: SOLVED: numpy would not load: libgcc_s vs. libgfortran Message-ID: <20160104235913.13cbed5baa5b33b3bdef375f@gmail.com> In-Reply-To: <568AEB8C.2000805@aldan.algebra.com> References: <568AA168.5090400@aldan.algebra.com> <20160104193453.2ae62e7a01ab0a0cd845e296@gmail.com> <568AC046.8040300@aldan.algebra.com> <20160104213150.4e47df03583e70cef356a51d@gmail.com> <568AE454.6010604@aldan.algebra.com> <568AEB8C.2000805@aldan.algebra.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 04 Jan 2016 17:00:44 -0500 "Mikhail T." <mi+thun@aldan.algebra.com> wrote: > On 04.01.2016 16:29, Mikhail T. wrote: > > ImportError: > > /opt/lib/python2.7/site-packages/numpy/core/multiarray.so: Undefined > > symbol "cblas_cdotc_sub" > Ok, the above went away, when I rebuilt all of the Fortran-using > dependencies of numpy with gfortran5. Don't know, if they were built > incorrectly somehow, or if something is wrong with gfortran48. > > My one-liner test script now "works", but the original problem is still > here -- only now it complains about gcc5's libgfortran: > > File "/opt/lib/python2.7/site-packages/numpy/core/__init__.py", > line 14, in <module> > from . import multiarray > ImportError: /lib/libgcc_s.so.1: version GCC_4.6.0 required by > /opt/lib/gcc5/libgfortran.so.3 not found > > I wonder, if this has something to do with my setting PYTHONPATH -- I > need the not-yet-installed mediagoblin packages to be found in ${WRKSRC} > by the tests. What is the proper way of to do this? You can add module (and submodules) with sys module. For example in mediagoblin/tests/tools.py before line beginning by 'from mediagoblin ...' import sys # Full path of mediagoblin sys.append('/spare/usr/ports/www/py-mediagoblin/work/mediagoblin-0.8.1/mediagoblin') You need also add subdirectories (that's why it's not easy to debug, because some directories is not necessarily Python's module, no __init__.py file). Another way is to use os.walk() function: import os import sys # mediagoblin full path goblin_path = '/spare/usr/ports/www/py-mediagoblin/work/mediagoblin-0.8.1/mediagoblin' for root, dirs, files in os.walk(goblin_path): for name in dirs: sys.append(os.path.join(root, name)) > > Thank you! > > -mi > -- olivier
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160104235913.13cbed5baa5b33b3bdef375f>