From owner-freebsd-python@FreeBSD.ORG Thu Apr 3 20:33:30 2014 Return-Path: Delivered-To: freebsd-python@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79B7A9A5 for ; Thu, 3 Apr 2014 20:33:30 +0000 (UTC) Received: from mail-ve0-x22d.google.com (mail-ve0-x22d.google.com [IPv6:2607:f8b0:400c:c01::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2EC5BBEF for ; Thu, 3 Apr 2014 20:33:30 +0000 (UTC) Received: by mail-ve0-f173.google.com with SMTP id oy12so708955veb.18 for ; Thu, 03 Apr 2014 13:33:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=U9BmdYM8DHzNhTkA8x9WXznb2KjbMfblcV9qFt5VAuY=; b=FgNLj5n+QxineTr8VN5NWDYlYIRp4JdMYuEVqjVpYHvzNBUIEkBbNFkVon2XCpQXwH 7qsAV7MhtwmjBB+TRZVkIp6EnLARs19ntCHDPkKoUnlQoEwICPEdaY1Pv4z/h3+MtIPy sz7h6Ou0XkKVDWI6dCYyVCPJ9y72zz8ptBKszoP/r+4oJw6CPVpB8gMVxtLOcnafv8Mr e2q2Xf6Xaa0SLWeiy7Lt2+IDT9NNPn+znLWU5Efud90+KH2eKHupEfNe1vCQ3GN6MGxx xQa6nW5LO8RJTMQCE0BnWF1YQeElRxiR5F8ZWzwWFlx7LKnpSDA7SIPkhlhvQWvzZ5oL p1PA== MIME-Version: 1.0 X-Received: by 10.220.49.8 with SMTP id t8mr54472vcf.41.1396557209192; Thu, 03 Apr 2014 13:33:29 -0700 (PDT) Received: by 10.220.111.6 with HTTP; Thu, 3 Apr 2014 13:33:29 -0700 (PDT) In-Reply-To: <533D5F29.2040506@saltant.com> References: <533D5F29.2040506@saltant.com> Date: Fri, 4 Apr 2014 04:33:29 +0800 Message-ID: Subject: Re: pandas import failed from iPython Notebook From: Irjohn Junus To: "John W. O'Brien" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: FreeBSD Python List X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Apr 2014 20:33:30 -0000 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) in ()----> 1 from numpy.linalg import * /usr/local/lib/python2.7/site-packages/numpy/__init__.py in () 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 () 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 () 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) in ()----> 1 from numpy.lib import scimath /usr/local/lib/python2.7/site-packages/numpy/__init__.py in () 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 () 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 () 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 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 > > *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@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 > > > > > > > > > > > > > > > --------------------------------------------------------------------------- > > ImportError Traceback (most recent call > last) > > in () > > ----> 1 import pandas as pd > > > > /usr/local/lib/python2.7/site-packages/pandas/__init__.py in () > > 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 () > > 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 () > > 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 > () > > 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 > () > > 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 > () > > 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 > () > > 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) > > in () > > ----> 1 import pandas > > > > /usr/local/lib/python2.7/site-packages/pandas/__init__.py in () > > 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 () > > 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 () > > 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 > () > > 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 > > > > > > >