• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Solved Jupyter requires gcc46

akram65

Member

Thanks: 2
Messages: 42

#1
Importing numpy, scipy or matplotlib (maybe more) gives the same error of missing gcc 4.6 :

Code:
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
/usr/local/lib/python3.6/site-packages/numpy/core/__init__.py in <module>()
     15 try:
---> 16     from . import multiarray
     17 except ImportError as exc:

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

During handling of the above exception, another exception occurred:

ImportError                               Traceback (most recent call last)
<ipython-input-2-d4cdadb62aa7> in <module>()
----> 1 import numpy

/usr/local/lib/python3.6/site-packages/numpy/__init__.py in <module>()
    140         return loader(*packages, **options)
    141
--> 142     from . import add_newdocs
    143     __all__ = ['add_newdocs',
    144                'ModuleDeprecationWarning',

/usr/local/lib/python3.6/site-packages/numpy/add_newdocs.py in <module>()
     11 from __future__ import division, absolute_import, print_function
     12
---> 13 from numpy.lib import add_newdoc
     14
     15 ###############################################################################

/usr/local/lib/python3.6/site-packages/numpy/lib/__init__.py in <module>()
      6 from numpy.version import version as __version__
      7
----> 8 from .type_check import *
      9 from .index_tricks import *
     10 from .function_base import *

/usr/local/lib/python3.6/site-packages/numpy/lib/type_check.py in <module>()
      9            'common_type']
     10
---> 11 import numpy.core.numeric as _nx
     12 from numpy.core.numeric import asarray, asanyarray, array, isnan, zeros
     13 from .ufunclike import isneginf, isposinf

/usr/local/lib/python3.6/site-packages/numpy/core/__init__.py in <module>()
     24 Original error was: %s
     25 """ % (exc,)
---> 26     raise ImportError(msg)
     27
     28 for envkey in env_added:

ImportError:
Importing the multiarray numpy extension module failed.  Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control).  Otherwise reinstall numpy.

Original error was: /lib/libgcc_s.so.1: version GCC_4.6.0 required by /usr/local/lib/gcc6/libgfortran.so.3 not found
This source, https://groups.google.com/forum/#!topic/jupyter/HPfdQC9UAW0 , speaks about same problem but for jupyterhub and that didn't workout for jupyter notebook for me. I didn't edit make.conf or libmap.conf in fear of breaking other things, btw.

What can be done about this?
Will renaming gcc6/gcc5 folder as gcc or gcc46 help?
 

akram65

Member

Thanks: 2
Messages: 42

#5
Yes indeed, it worked.
This is what I had to do:

1. add
Code:
setenv  LD_LIBRARY_PATH /usr/local/lib/gcc6
to /.cshrc

2. add

Code:
import os
os.environ['LD_LIBRARY_PATH'] = '/usr/local/lib/gcc6'
to /usr/local/bin/jupyter-notebook

3. restart

Got this solution from the stackoverflow link ('https://stackoverflow.com/questions...otebook-numpy-pandas-matplotlib-error-freebsd') given in the link provided by Nicola Mingotti above.

Thanks all :)