pandas import failed from iPython Notebook

Irjohn Junus i.junus at gmail.com
Thu Apr 3 20:33:30 UTC 2014


Hi John,

Thanks for your reply.

0. I wouldn't know, it's my first time installing Python scientific
environment in FreeBSD. No experience with previous versions.

1. Yes, both imports consistently give me ImportError but only in iPython
Notebook, works fine in iPyhon console just like importing pandas per my
previous email. Captions below.

2. No. Only in iPython Notebook.

3. Ports collection updated to latest just yesterday.

 BTW, Jimmy had kindly replied with a temporary solution earlier. Looks
more like iPython Notebook issue to me.

Regards,
Irjohn



from numpy.linalg import *

---------------------------------------------------------------------------ImportError
                              Traceback (most recent call
last)<ipython-input-3-80a2863fa0d3> in <module>()----> 1 from
numpy.linalg import *
/usr/local/lib/python2.7/site-packages/numpy/__init__.py in <module>()
   151         return loader(*packages, **options)    152 --> 153
from . import add_newdocs    154     __all__ = ['add_newdocs',
'ModuleDeprecationWarning']    155
/usr/local/lib/python2.7/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/python2.7/site-packages/numpy/lib/__init__.py in
<module>()     15 from .ufunclike import *     16 ---> 17 from .
import scimath as emath     18 from .polynomial import *     19
#import convertcode
ImportError: cannot import name scimath




from numpy.lib import scimath

---------------------------------------------------------------------------ImportError
                              Traceback (most recent call
last)<ipython-input-4-ba88c6cc7bf7> in <module>()----> 1 from
numpy.lib import scimath
/usr/local/lib/python2.7/site-packages/numpy/__init__.py in <module>()
   151         return loader(*packages, **options)    152 --> 153
from . import add_newdocs    154     __all__ = ['add_newdocs',
'ModuleDeprecationWarning']    155
/usr/local/lib/python2.7/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/python2.7/site-packages/numpy/lib/__init__.py in
<module>()     15 from .ufunclike import *     16 ---> 17 from .
import scimath as emath     18 from .polynomial import *     19
#import convertcode
ImportError: cannot import name scimath






On Thu, Apr 3, 2014 at 9:16 PM, John W. O'Brien <john at saltant.com> wrote:

> On 4/3/14 1:30 AM, Irjohn Junus wrote:
> > Dear John,
> >
> > I wrote to iPython maintainer Jimmy earlier and I thought I write to you
> > at the same time hoping you'd have a pointer for me to follow. Email
> > below. Thank you.
>
> Hi Irjohn,
>
> I'm CC'ing the freebsd-python mailing list get more eyes on this and to
> record our solution for posterity.
>
> It appears that numpy is implicated in both cases.
>
> 0.   Was this working before, with a previous version?
>
> 1.   Can you reproduce this by importing the applicable parts of numpy
>      into IPython directly?
>
>      In[1]: from numpy.linalg import *
>
>      In[2]: from numpy.lib import scimath
>
> 2.   Can you reproduce this when using the CPython shell instead of
>      IPython?
>
> 3.   Do you build ports from source or install from a package
>      repository?
>
> Regards,
> John
>
> > Dear Jimmy,
> >
> > I'd just installed *py27-ipython-1.2.1_2
> > <http://svnweb.freebsd.org/ports/head/devel/ipython> *port yesterday on
> > my 9.1-RELEASE-p7 server and had been struggling to import pandas from
> > iPython notebook running in my laptop web browser (error message
> > captioned below). Weird thing is it imported fine from iPython console
> > terminal from within the server. Having searched the official and other
> > forums (there's discussion about putting patch for gcc4.6 vs 4.7 with
> > fortran mentioned, but I wouldn't know how to do it) plus hours of
> > Googling I have no other way than contacting you.
> >
> > Depending on which way I imported:
> > 1. import pandas as pd: gives ImportError: /lib/libgcc_s.so.1: version
> > GCC_4.6.0 required by /usr/local/lib/gcc47/libgfortran.so.3 not found
> > 2. import pandas: gives: ImportError: cannot import name scimath
> > Appreciate any pointer into the right direction please. Thank you.
> >
> >
> >
> > Regards,
> > Irjohn
> >
> > FreeBSD mars 9.1-RELEASE-p7 FreeBSD 9.1-RELEASE-p7 #0: Mon Sep  9
> > 21:34:37 UTC 2013
> > root at amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
> >
> >
> >
> >
> >
> >
> >
> ---------------------------------------------------------------------------
> > ImportError                               Traceback (most recent call
> last)
> > <ipython-input-1-af55e7023913> in <module>()
> > ----> 1 import pandas as pd
> >
> > /usr/local/lib/python2.7/site-packages/pandas/__init__.py in <module>()
> >       4
> >       5 try:
> > ----> 6     from . import hashtable, tslib, lib
> >       7 except Exception:  # pragma: no cover
> >       8     import sys
> >
> > /root/numpy.pxd in init pandas.hashtable (pandas/hashtable.c:21547)()
> >
> > /usr/local/lib/python2.7/site-packages/numpy/__init__.pyc in <module>()
> >     151         return loader(*packages, **options)
> >     152
> > --> 153     from . import add_newdocs
> >     154     __all__ = ['add_newdocs', 'ModuleDeprecationWarning']
> >     155
> >
> > /usr/local/lib/python2.7/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/python2.7/site-packages/numpy/lib/__init__.py in
> <module>()
> >      16
> >      17 from . import scimath as emath
> > ---> 18 from .polynomial import *
> >      19 #import convertcode
> >      20 from .utils import *
> >
> > /usr/local/lib/python2.7/site-packages/numpy/lib/polynomial.py in
> <module>()
> >      17 from numpy.lib.function_base import trim_zeros, sort_complex
> >      18 from numpy.lib.type_check import iscomplex, real, imag
> > ---> 19 from numpy.linalg import eigvals, lstsq, inv
> >      20
> >      21 class RankWarning(UserWarning):
> >
> > /usr/local/lib/python2.7/site-packages/numpy/linalg/__init__.py in
> <module>()
> >      48 from .info import __doc__
> >      49
> > ---> 50 from .linalg import *
> >      51
> >      52 from numpy.testing import Tester
> >
> > /usr/local/lib/python2.7/site-packages/numpy/linalg/linalg.py in
> <module>()
> >      27     )
> >      28 from numpy.lib import triu, asfarray
> > ---> 29 from numpy.linalg import lapack_lite, _umath_linalg
> >      30 from numpy.matrixlib.defmatrix import matrix_power
> >      31 from numpy.compat import asbytes
> >
> > ImportError: /lib/libgcc_s.so.1: version GCC_4.6.0 required by
> /usr/local/lib/gcc47/libgfortran.so.3 not found
> >
> > /lib/libgcc_s.so.1: version GCC_4.6.0 required by
> /usr/local/lib/gcc47/libgfortran.so.3 not found
> >
> >
> >
> >
> >
> >
> >
> >
> ---------------------------------------------------------------------------
> > ImportError                               Traceback (most recent call
> last)
> > <ipython-input-1-d6ac987968b6> in <module>()
> > ----> 1 import pandas
> >
> > /usr/local/lib/python2.7/site-packages/pandas/__init__.py in <module>()
> >       4
> >       5 try:
> > ----> 6     from . import hashtable, tslib, lib
> >       7 except Exception:  # pragma: no cover
> >       8     import sys
> >
> > /root/numpy.pxd in init pandas.hashtable (pandas/hashtable.c:21547)()
> >
> > /usr/local/lib/python2.7/site-packages/numpy/__init__.py in <module>()
> >     151         return loader(*packages, **options)
> >     152
> > --> 153     from . import add_newdocs
> >     154     __all__ = ['add_newdocs', 'ModuleDeprecationWarning']
> >     155
> >
> > /usr/local/lib/python2.7/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/python2.7/site-packages/numpy/lib/__init__.py in
> <module>()
> >      15 from .ufunclike import *
> >      16
> > ---> 17 from . import scimath as emath
> >      18 from .polynomial import *
> >      19 #import convertcode
> >
> > ImportError: cannot import name scimath
> >
> > cannot import name scimath
> >
> >
>
>
>


More information about the freebsd-python mailing list