# I got an error "undefined symbol: _gfortran_stop_numeric_f08" when I import orthpol_light in Anaconda.

Recently I have downloaded your TransportMaps package available at http://transportmaps.mit.edu/. However, when I try to import it through anaconda, I got the following issue:

ImportError: /home/kclam/anaconda3/lib/python3.6/site-packages/orthpol_light.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _gfortran_stop_numeric_f08

May i know if it is related to my gfortran version?
My gfortran version is

GNU Fortran (Ubuntu 5.4.0-6ubuntu1~16.04.5) 5.4.0 20160609

Copyright (C) 2015 Free Software Foundation, Inc.

I was able to reproduce the error. Anaconda uses by default python3.6. For some reason compiling orthpol_light against the libgfortran provided by anaconda raises that undefined symbol error.

A workaround is to use python3.5 (which is the version supported by Ubuntu16.04). To do so you can create a new environment in conda (which is anyway advised in order to keep things tided):

$conda create -n tm python=3.5 numpy scipy then activate the newly created environment $ source activate tm

and installing orthpol_light through pip

\$ pip install orthpol_light

I will dig into figuring out whether the problem with python3.6 is only related to anaconda or more general.

answered Dec 4, 2017 by (267 points)
selected Mar 9 by dabi
Thank you very much for figuring out the problem. I am now able to run the test examples.

Very best regards,
Jeffery