Numpy in Jupyter GCC-4.6 error

I have Jupyterhub running in a jail with Python 3.5.
Code:
$ pip3 install numpy
installs with no errors

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

In notebook cell:
Code:
import numpy as np

Gives error:
Code:
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, gcc46, cblas, pkgconfig

Code:
$ 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.
 
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
 
Back
Top