Numpy in Jupyter GCC-4.6 error

47 views
Skip to first unread message

Peter Sprague

unread,
Oct 2, 2016, 4:01:50 PM10/2/16
to Project Jupyter
I have Jupyterhub running in a FreeBSD jail with Python 3.5.

$ pip3 install numpy

installs with no errors

$ python35
>> import numpy
>> [aka no error]


In notebook cell:
ln[]: import numpy as np

Gives error:
ImportError: /lib/libgcc_s.so.1: version GCC_4.6.0 required by /usr/local/lib/gcc48/libgfortran.so.3 not found

Ports installed include lapack, openblas, gcc (4.8), gcc46, cblas, pkgconfig

$ pip3 install scipy

Throws all kinds of errors related back to gcc 4.6 fortran

Any ideas how to fix this? Haven't found anything that works so far.

Peter Sprague

unread,
Oct 2, 2016, 4:20:21 PM10/2/16
to Project Jupyter
Setting LD_LIBRARY_PATH had worked with Python 2.7 in the past.  Doesn't help now.

https://groups.google.com/forum/#!msg/jupyter/pYqPONG0BBQ/4irri6TkAgAJ;context-place=forum/jupyter

MinRK

unread,
Oct 3, 2016, 5:51:54 AM10/3/16
to Project Jupyter
Can you compare os.environ in the two contexts? And `sys.executable` and `sys.path`?

-Min

On Sun, Oct 2, 2016 at 10:20 PM, Peter Sprague <geovisionen...@gmail.com> wrote:
Setting LD_LIBRARY_PATH had worked with Python 2.7 in the past.  Doesn't help now.

https://groups.google.com/forum/#!msg/jupyter/pYqPONG0BBQ/4irri6TkAgAJ;context-place=forum/jupyter

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/82e0f47d-bb54-496d-8ae2-dff026cc2a79%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Peter Sprague

unread,
Oct 3, 2016, 12:47:12 PM10/3/16
to Project Jupyter
Brute force solution:

Code:
$ portmaster gcc5
$ ln -s /usr/local/lib/gcc5 /usr/local/lib/gcc
$ ln -s /usr/local/bin/gcc5 /usr/local/lib/gcc


For this jail:
in /etc/make.conf
Code:
.if !empty(.CURDIR:M/usr/ports/*) && exists(/usr/local/bin/gcc5)
CC=gcc49
CXX=g++49
CPP=cpp49
.endif


Edit /etc/libmap.conf:
Code:
libgcc_s.so.1   gcc5/libgcc_s.so.1
libgomp.so.1    gcc5/libgomp.so.1
libobjc.so.3    gcc5/libobjc.so.4
libssp.so.0     gcc5/libssp.so.0
libstdc++.so.6  gcc5/libstdc++.so.6


See: http://unix.stackexchange.com/questions/130639/how-do-i-install-the-latest-gcc-on-freebsd

Reply all
Reply to author
Forward
0 new messages