Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #54232 > unrolled thread

statsmodels.api

Started byDavide Dalmasso <davide.dalmasso@gmail.com>
First post2013-09-16 08:37 -0700
Last post2013-09-17 05:15 -0700
Articles 16 — 6 participants

Back to article view | Back to comp.lang.python


Contents

  statsmodels.api Davide Dalmasso <davide.dalmasso@gmail.com> - 2013-09-16 08:37 -0700
    Re: statsmodels.api John Gordon <gordon@panix.com> - 2013-09-16 16:30 +0000
    Re: statsmodels.api Ethan Furman <ethan@stoneleaf.us> - 2013-09-16 08:47 -0700
      Re: statsmodels.api Davide Dalmasso <davide.dalmasso@gmail.com> - 2013-09-17 03:10 -0700
        Re: statsmodels.api Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-09-17 12:55 +0100
          Re: statsmodels.api Davide Dalmasso <davide.dalmasso@gmail.com> - 2013-09-17 05:13 -0700
            Re: statsmodels.api Josef Pktd <josef.pktd@gmail.com> - 2013-09-17 06:02 -0700
            Re: statsmodels.api Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-09-17 14:06 +0100
              Re: statsmodels.api Josef Pktd <josef.pktd@gmail.com> - 2013-09-17 06:35 -0700
                Re: statsmodels.api Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-09-17 15:10 +0100
                  Re: statsmodels.api Davide Dalmasso <davide.dalmasso@gmail.com> - 2013-09-17 07:46 -0700
                Re: statsmodels.api Josef Perktold <josef.pktd@gmail.com> - 2013-09-17 14:52 +0000
                Re: statsmodels.api Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-09-17 16:41 +0100
                Re: statsmodels.api Josef Perktold <josef.pktd@gmail.com> - 2013-09-17 16:15 +0000
                Re: statsmodels.api Josef Perktold <josef.pktd@gmail.com> - 2013-09-18 00:03 +0000
    Re: statsmodels.api Davide Dalmasso <davide.dalmasso@gmail.com> - 2013-09-17 05:15 -0700

#54232 — statsmodels.api

FromDavide Dalmasso <davide.dalmasso@gmail.com>
Date2013-09-16 08:37 -0700
Subjectstatsmodels.api
Message-ID<eac9f1af-74e0-4eb0-8719-766894b52f37@googlegroups.com>
Hi,

I intalled an executable version of statsmodels library for Windows 32-bit.
When I import it in my Python Shell no problem occurs buy when I write:

import statsmodels.api as sm

the following error arises:

Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    import statsmodels.api
  File "C:\Python33\lib\site-packages\statsmodels\api.py", line 1, in <module>
    from . import iolib, datasets, tools
  File "C:\Python33\lib\site-packages\statsmodels\iolib\__init__.py", line 1, in <module>
    from .foreign import StataReader, genfromdta, savetxt
  File "C:\Python33\lib\site-packages\statsmodels\iolib\foreign.py", line 20, in <module>
    import statsmodels.tools.data as data_util
  File "C:\Python33\lib\site-packages\statsmodels\tools\__init__.py", line 1, in <module>
    from .tools import add_constant, categorical
  File "C:\Python33\lib\site-packages\statsmodels\tools\tools.py", line 8, in <module>
    from scipy.interpolate import interp1d
  File "C:\Python33\lib\site-packages\scipy\interpolate\__init__.py", line 150, in <module>
    from .interpolate import *
  File "C:\Python33\lib\site-packages\scipy\interpolate\interpolate.py", line 12, in <module>
    import scipy.special as spec
  File "C:\Python33\lib\site-packages\scipy\special\__init__.py", line 529, in <module>
    from ._ufuncs import *

Why?

Thanks for any help you will want to give me!

Davide

[toc] | [next] | [standalone]


#54236

FromJohn Gordon <gordon@panix.com>
Date2013-09-16 16:30 +0000
Message-ID<l17bnd$653$1@reader1.panix.com>
In reply to#54232
In <eac9f1af-74e0-4eb0-8719-766894b52f37@googlegroups.com> Davide Dalmasso <davide.dalmasso@gmail.com> writes:

> Hi,

> I intalled an executable version of statsmodels library for Windows 32-bit.
> When I import it in my Python Shell no problem occurs buy when I write:

> import statsmodels.api as sm

> the following error arises:

> Traceback (most recent call last):
>   File "<pyshell#1>", line 1, in <module>
>     import statsmodels.api
>   File "C:\Python33\lib\site-packages\statsmodels\api.py", line 1, in <module>
>     from . import iolib, datasets, tools
>   File "C:\Python33\lib\site-packages\statsmodels\iolib\__init__.py", line 1, in <module>
>     from .foreign import StataReader, genfromdta, savetxt
>   File "C:\Python33\lib\site-packages\statsmodels\iolib\foreign.py", line 20, in <module>
>     import statsmodels.tools.data as data_util
>   File "C:\Python33\lib\site-packages\statsmodels\tools\__init__.py", line 1, in <module>
>     from .tools import add_constant, categorical
>   File "C:\Python33\lib\site-packages\statsmodels\tools\tools.py", line 8, in <module>
>     from scipy.interpolate import interp1d
>   File "C:\Python33\lib\site-packages\scipy\interpolate\__init__.py", line 150, in <module>
>     from .interpolate import *
>   File "C:\Python33\lib\site-packages\scipy\interpolate\interpolate.py", line 12, in <module>
>     import scipy.special as spec
>   File "C:\Python33\lib\site-packages\scipy\special\__init__.py", line 529, in <module>
>     from ._ufuncs import *

This error traceback appears incomplete.  Did you paste the whole thing?

-- 
John Gordon                   A is for Amy, who fell down the stairs
gordon@panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"

[toc] | [prev] | [next] | [standalone]


#54237

FromEthan Furman <ethan@stoneleaf.us>
Date2013-09-16 08:47 -0700
Message-ID<mailman.32.1379349395.18130.python-list@python.org>
In reply to#54232
On 09/16/2013 08:37 AM, Davide Dalmasso wrote:
> Hi,
>
> I intalled an executable version of statsmodels library for Windows 32-bit.
> When I import it in my Python Shell no problem occurs buy when I write:
>
> import statsmodels.api as sm
>
> the following error arises:
>
> Traceback (most recent call last):
>    File "<pyshell#1>", line 1, in <module>
>      import statsmodels.api
>    File "C:\Python33\lib\site-packages\statsmodels\api.py", line 1, in <module>
>      from . import iolib, datasets, tools
>    File "C:\Python33\lib\site-packages\statsmodels\iolib\__init__.py", line 1, in <module>
>      from .foreign import StataReader, genfromdta, savetxt
>    File "C:\Python33\lib\site-packages\statsmodels\iolib\foreign.py", line 20, in <module>
>      import statsmodels.tools.data as data_util
>    File "C:\Python33\lib\site-packages\statsmodels\tools\__init__.py", line 1, in <module>
>      from .tools import add_constant, categorical
>    File "C:\Python33\lib\site-packages\statsmodels\tools\tools.py", line 8, in <module>
>      from scipy.interpolate import interp1d
>    File "C:\Python33\lib\site-packages\scipy\interpolate\__init__.py", line 150, in <module>
>      from .interpolate import *
>    File "C:\Python33\lib\site-packages\scipy\interpolate\interpolate.py", line 12, in <module>
>      import scipy.special as spec
>    File "C:\Python33\lib\site-packages\scipy\special\__init__.py", line 529, in <module>
>      from ._ufuncs import *

We'll need the rest of the traceback, as it will have the actual error.

--
~Ethan~

[toc] | [prev] | [next] | [standalone]


#54275

FromDavide Dalmasso <davide.dalmasso@gmail.com>
Date2013-09-17 03:10 -0700
Message-ID<d4520537-a139-453a-9f2a-985d6177f802@googlegroups.com>
In reply to#54237
Il giorno lunedì 16 settembre 2013 17:47:55 UTC+2, Ethan Furman ha scritto:
> On 09/16/2013 08:37 AM, Davide Dalmasso wrote:
> 
> > Hi,
> 
> >
> 
> > I intalled an executable version of statsmodels library for Windows 32-bit.
> 
> > When I import it in my Python Shell no problem occurs buy when I write:
> 
> >
> 
> > import statsmodels.api as sm
> 
> >
> 
> > the following error arises:
> 
> >
> 
> > Traceback (most recent call last):
> 
> >    File "<pyshell#1>", line 1, in <module>
> 
> >      import statsmodels.api
> 
> >    File "C:\Python33\lib\site-packages\statsmodels\api.py", line 1, in <module>
> 
> >      from . import iolib, datasets, tools
> 
> >    File "C:\Python33\lib\site-packages\statsmodels\iolib\__init__.py", line 1, in <module>
> 
> >      from .foreign import StataReader, genfromdta, savetxt
> 
> >    File "C:\Python33\lib\site-packages\statsmodels\iolib\foreign.py", line 20, in <module>
> 
> >      import statsmodels.tools.data as data_util
> 
> >    File "C:\Python33\lib\site-packages\statsmodels\tools\__init__.py", line 1, in <module>
> 
> >      from .tools import add_constant, categorical
> 
> >    File "C:\Python33\lib\site-packages\statsmodels\tools\tools.py", line 8, in <module>
> 
> >      from scipy.interpolate import interp1d
> 
> >    File "C:\Python33\lib\site-packages\scipy\interpolate\__init__.py", line 150, in <module>
> 
> >      from .interpolate import *
> 
> >    File "C:\Python33\lib\site-packages\scipy\interpolate\interpolate.py", line 12, in <module>
> 
> >      import scipy.special as spec
> 
> >    File "C:\Python33\lib\site-packages\scipy\special\__init__.py", line 529, in <module>
> 
> >      from ._ufuncs import *
> 
> 
> 
> We'll need the rest of the traceback, as it will have the actual error.
> 
> 
> 
> --
> 
> ~Ethan~

Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:03:43) [MSC v.1600 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> import statsmodels.api as sm
Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import statsmodels.api as sm
  File "C:\Python33\lib\site-packages\statsmodels\api.py", line 1, in <module>
    from . import iolib, datasets, tools
  File "C:\Python33\lib\site-packages\statsmodels\iolib\__init__.py", line 1, in <module>
    from .foreign import StataReader, genfromdta, savetxt
  File "C:\Python33\lib\site-packages\statsmodels\iolib\foreign.py", line 20, in <module>
    import statsmodels.tools.data as data_util
  File "C:\Python33\lib\site-packages\statsmodels\tools\__init__.py", line 1, in <module>
    from .tools import add_constant, categorical
  File "C:\Python33\lib\site-packages\statsmodels\tools\tools.py", line 8, in <module>
    from scipy.interpolate import interp1d
  File "C:\Python33\lib\site-packages\scipy\interpolate\__init__.py", line 150, in <module>
    from .interpolate import *
  File "C:\Python33\lib\site-packages\scipy\interpolate\interpolate.py", line 12, in <module>
    import scipy.special as spec
  File "C:\Python33\lib\site-packages\scipy\special\__init__.py", line 529, in <module>
    from ._ufuncs import *
ImportError: DLL load failed: Impossibile trovare il modulo specificato.
>>>

[toc] | [prev] | [next] | [standalone]


#54282

FromOscar Benjamin <oscar.j.benjamin@gmail.com>
Date2013-09-17 12:55 +0100
Message-ID<mailman.60.1379418987.18130.python-list@python.org>
In reply to#54275
On 17 September 2013 11:10, Davide Dalmasso <davide.dalmasso@gmail.com> wrote:
> Il giorno lunedì 16 settembre 2013 17:47:55 UTC+2, Ethan Furman ha scritto:
>>
>> We'll need the rest of the traceback, as it will have the actual error.
>>
> Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:03:43) [MSC v.1600 32 bit (Intel)] on win32
> Type "copyright", "credits" or "license()" for more information.
>>>> import statsmodels.api as sm
> Traceback (most recent call last):
>   File "<pyshell#0>", line 1, in <module>
>     import statsmodels.api as sm
>   File "C:\Python33\lib\site-packages\statsmodels\api.py", line 1, in <module>
>     from . import iolib, datasets, tools
>   File "C:\Python33\lib\site-packages\statsmodels\iolib\__init__.py", line 1, in <module>
>     from .foreign import StataReader, genfromdta, savetxt
>   File "C:\Python33\lib\site-packages\statsmodels\iolib\foreign.py", line 20, in <module>
>     import statsmodels.tools.data as data_util
>   File "C:\Python33\lib\site-packages\statsmodels\tools\__init__.py", line 1, in <module>
>     from .tools import add_constant, categorical
>   File "C:\Python33\lib\site-packages\statsmodels\tools\tools.py", line 8, in <module>
>     from scipy.interpolate import interp1d
>   File "C:\Python33\lib\site-packages\scipy\interpolate\__init__.py", line 150, in <module>
>     from .interpolate import *
>   File "C:\Python33\lib\site-packages\scipy\interpolate\interpolate.py", line 12, in <module>
>     import scipy.special as spec
>   File "C:\Python33\lib\site-packages\scipy\special\__init__.py", line 529, in <module>
>     from ._ufuncs import *
> ImportError: DLL load failed: Impossibile trovare il modulo specificato.
>>>>

This looks like a bug in your scipy installation. What happens if you
try the following in an interactive session:

>>> import scipy
>>> from scipy.interpolate import interp1d

Also how did you install scipy? I didn't think that Windows binaries
for Python 3.3 were available yet.


Oscar

[toc] | [prev] | [next] | [standalone]


#54287

FromDavide Dalmasso <davide.dalmasso@gmail.com>
Date2013-09-17 05:13 -0700
Message-ID<477a0f61-87d6-4937-8467-743fc053ecec@googlegroups.com>
In reply to#54282
You are right... there is a problem with scipy intallation because this error arise...

>>> from scipy.interpolate import interp1d
Traceback (most recent call last):
  File "<pyshell#3>", line 1, in <module>
    from scipy.interpolate import interp1d
  File "C:\Python33\lib\site-packages\scipy\interpolate\__init__.py", line 150, in <module>
    from .interpolate import *
  File "C:\Python33\lib\site-packages\scipy\interpolate\interpolate.py", line 12, in <module>
    import scipy.special as spec
  File "C:\Python33\lib\site-packages\scipy\special\__init__.py", line 529, in <module>
    from ._ufuncs import *
ImportError: DLL load failed: Impossibile trovare il modulo specificato.

I tryed to re-install the scipy executable that I downloaded from http://www.lfd.uci.edu/~gohlke/pythonlibs/
but the problem persists

[toc] | [prev] | [next] | [standalone]


#54294

FromJosef Pktd <josef.pktd@gmail.com>
Date2013-09-17 06:02 -0700
Message-ID<8dc86b4d-4c0e-4db5-9f6c-ea3dac65452a@googlegroups.com>
In reply to#54287
On Tuesday, September 17, 2013 8:13:27 AM UTC-4, Davide Dalmasso wrote:
> You are right... there is a problem with scipy intallation because this error arise...
> 
> 
> 
> >>> from scipy.interpolate import interp1d
> 
> Traceback (most recent call last):
> 
>   File "<pyshell#3>", line 1, in <module>
> 
>     from scipy.interpolate import interp1d
> 
>   File "C:\Python33\lib\site-packages\scipy\interpolate\__init__.py", line 150, in <module>
> 
>     from .interpolate import *
> 
>   File "C:\Python33\lib\site-packages\scipy\interpolate\interpolate.py", line 12, in <module>
> 
>     import scipy.special as spec
> 
>   File "C:\Python33\lib\site-packages\scipy\special\__init__.py", line 529, in <module>
> 
>     from ._ufuncs import *
> 
> ImportError: DLL load failed: Impossibile trovare il modulo specificato.
> 
> 
> 
> I tryed to re-install the scipy executable that I downloaded from http://www.lfd.uci.edu/~gohlke/pythonlibs/
> 
> but the problem persists

Did you also install numpy from gohlke?
My guess would be binary incompatibility if numpy is not the MKL version.

Josef

[toc] | [prev] | [next] | [standalone]


#54295

FromOscar Benjamin <oscar.j.benjamin@gmail.com>
Date2013-09-17 14:06 +0100
Message-ID<mailman.68.1379423249.18130.python-list@python.org>
In reply to#54287
On 17 September 2013 13:13, Davide Dalmasso <davide.dalmasso@gmail.com> wrote:
>
> You are right... there is a problem with scipy intallation because this error arise...
>
>>>> from scipy.interpolate import interp1d
> Traceback (most recent call last):
>   File "<pyshell#3>", line 1, in <module>
>     from scipy.interpolate import interp1d
>   File "C:\Python33\lib\site-packages\scipy\interpolate\__init__.py", line 150, in <module>
>     from .interpolate import *
>   File "C:\Python33\lib\site-packages\scipy\interpolate\interpolate.py", line 12, in <module>
>     import scipy.special as spec
>   File "C:\Python33\lib\site-packages\scipy\special\__init__.py", line 529, in <module>
>     from ._ufuncs import *
> ImportError: DLL load failed: Impossibile trovare il modulo specificato.
>
> I tryed to re-install the scipy executable that I downloaded from http://www.lfd.uci.edu/~gohlke/pythonlibs/
> but the problem persists

There are potential compatibility problems with the binaries from
there as described at the top of the page. One thing is that you need
to use Christopher's own numpy build to go with scipy:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
If you installed numpy from somewhere else then that could be your problem.

Essentially scipy isn't quite ported to Python 3.3 yet so my general
advice is to use Python 3.2 and to use the official numpy/scipy
binaries from sourceforge (they don't yet provide binaries for 3.3).

Alternatively an easier approach might be to use Python(x, y) (which
is free) or the Enthought Python Distribution (which is free for
academic users). These are distributions that bundle Python with
numpy/scipy and lots of other packages. I think they both still use
Python 2.7 though.

(As an aside, this is all much simpler if you're using Ubuntu or some
other Linux distro rather than Windows.)


Oscar

[toc] | [prev] | [next] | [standalone]


#54297

FromJosef Pktd <josef.pktd@gmail.com>
Date2013-09-17 06:35 -0700
Message-ID<41a1e4b3-e497-43eb-8095-c2254afa2407@googlegroups.com>
In reply to#54295
On Tuesday, September 17, 2013 9:06:59 AM UTC-4, Oscar Benjamin wrote:
> On 17 September 2013 13:13, Davide Dalmasso  wrote:
> 
> >
> 
> > You are right... there is a problem with scipy intallation because this error arise...
> 
> >
> 
> >>>> from scipy.interpolate import interp1d
> 
> > Traceback (most recent call last):
> 
> >   File "<pyshell#3>", line 1, in <module>
> 
> >     from scipy.interpolate import interp1d
> 
> >   File "C:\Python33\lib\site-packages\scipy\interpolate\__init__.py", line 150, in <module>
> 
> >     from .interpolate import *
> 
> >   File "C:\Python33\lib\site-packages\scipy\interpolate\interpolate.py", line 12, in <module>
> 
> >     import scipy.special as spec
> 
> >   File "C:\Python33\lib\site-packages\scipy\special\__init__.py", line 529, in <module>
> 
> >     from ._ufuncs import *
> 
> > ImportError: DLL load failed: Impossibile trovare il modulo specificato.
> 
> >
> 
> > I tryed to re-install the scipy executable that I downloaded from http://www.lfd.uci.edu/~gohlke/pythonlibs/
> 
> > but the problem persists
> 
> 
> 
> There are potential compatibility problems with the binaries from
> 
> there as described at the top of the page. One thing is that you need
> 
> to use Christopher's own numpy build to go with scipy:
> 
> http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
> 
> If you installed numpy from somewhere else then that could be your problem.
> 
> 
> 
> Essentially scipy isn't quite ported to Python 3.3 yet so my general
> 
> advice is to use Python 3.2 and to use the official numpy/scipy
> 
> binaries from sourceforge (they don't yet provide binaries for 3.3).
> 
> 
> 
> Alternatively an easier approach might be to use Python(x, y) (which
> 
> is free) or the Enthought Python Distribution (which is free for
> 
> academic users). These are distributions that bundle Python with
> 
> numpy/scipy and lots of other packages. I think they both still use
> 
> Python 2.7 though.
> 
> 
> 
> (As an aside, this is all much simpler if you're using Ubuntu or some
> 
> other Linux distro rather than Windows.)

scientific python on a stick

https://code.google.com/p/winpython/wiki/PackageIndex_33

I haven't seen any problems so far on python 3.3
The statsmodels test suite passes without problems on python 3.3 also, as far as I remember.
(and no problems using Windows. just use the right binaries.)

Josef

> 
> 
> 
> 
> 
> Oscar

[toc] | [prev] | [next] | [standalone]


#54301

FromOscar Benjamin <oscar.j.benjamin@gmail.com>
Date2013-09-17 15:10 +0100
Message-ID<mailman.72.1379427074.18130.python-list@python.org>
In reply to#54297
On 17 September 2013 14:35, Josef Pktd <josef.pktd@gmail.com> wrote:
>> (As an aside, this is all much simpler if you're using Ubuntu or some
>> other Linux distro rather than Windows.)
>
> scientific python on a stick
>
> https://code.google.com/p/winpython/wiki/PackageIndex_33

Thanks, I've just installed that and I'll try it out later.

> I haven't seen any problems so far on python 3.3
> The statsmodels test suite passes without problems on python 3.3 also, as far as I remember.
> (and no problems using Windows. just use the right binaries.)

Well that's exactly my point. On a Linux distro you would have the
right binaries first time. No need to search through project webpages
or documentation, weigh up different installers, or download 750MB of
software that you mostly won't use. Similarly on a Linux distro it's a
lot easier to get all of the build tools set up to build these things
from source if you'd prefer.

Windows users are often dependent on inconsistent sources of binaries.
In this case I imagine that the OP installed numpy from sourceforge
since it has 3.3 binaries but it doesn't have the same for scipy at
which point googling would easily lead to Cristoph's page.


Oscar

[toc] | [prev] | [next] | [standalone]


#54307

FromDavide Dalmasso <davide.dalmasso@gmail.com>
Date2013-09-17 07:46 -0700
Message-ID<8c264a36-47ed-4ecc-bf06-23ea52dc5680@googlegroups.com>
In reply to#54301
Oscar you are right!

The problem was Numpy!
I re-installed it using an executable that I downloaded from:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy 
I don't remember if previously I installed it using another source.

However the problem now is disappeared!

Many thanks!

Davide

[toc] | [prev] | [next] | [standalone]


#54309

FromJosef Perktold <josef.pktd@gmail.com>
Date2013-09-17 14:52 +0000
Message-ID<mailman.76.1379430006.18130.python-list@python.org>
In reply to#54297
Oscar Benjamin <oscar.j.benjamin <at> gmail.com> writes:

> 
> On 17 September 2013 14:35, Josef Pktd <josef.pktd <at> gmail.com> wrote:
> >> (As an aside, this is all much simpler if you're using Ubuntu or some
> >> other Linux distro rather than Windows.)
> >
> > scientific python on a stick
> >
> > https://code.google.com/p/winpython/wiki/PackageIndex_33
> 
> Thanks, I've just installed that and I'll try it out later.
> 
> > I haven't seen any problems so far on python 3.3
> > The statsmodels test suite passes without problems on python 3.3 also,
as far as I remember.
> > (and no problems using Windows. just use the right binaries.)
> 
> Well that's exactly my point. On a Linux distro you would have the
> right binaries first time. No need to search through project webpages
> or documentation, weigh up different installers, or download 750MB of
> software that you mostly won't use. Similarly on a Linux distro it's a
> lot easier to get all of the build tools set up to build these things
> from source if you'd prefer.

This might be true for many Linux users.
However, the last time I tried to install something in a virtual Linux OS
that was not in the standard repository, I was completely lost.
(I'm a Windows user.)


> 
> Windows users are often dependent on inconsistent sources of binaries.
> In this case I imagine that the OP installed numpy from sourceforge
> since it has 3.3 binaries but it doesn't have the same for scipy at
> which point googling would easily lead to Cristoph's page.

Another problem with relying on binaries on Windows is when the matching
binaries are not available. For example, the Windows binaries on pypi of
pandas and statsmodels are compiled against the latest numpy release and
will not work with older numpy versions.
(
http://stackoverflow.com/questions/17709641/valueerror-numpy-dtype-has-the-wrong-size-try-recompiling/18369312
)

On the other hand, python-xy comes with MingW, and I never had any problems
compiling pandas and statsmodels for any version combination of python and
numpy that I tested (although 32 bit only so far, I never set up the
Microsoft sdk).

(latest news: moving to MingW-64 for numpy and scipy, and related packages,
might be on the way.)

Josef


> 
> Oscar
> 



[toc] | [prev] | [next] | [standalone]


#54316

FromOscar Benjamin <oscar.j.benjamin@gmail.com>
Date2013-09-17 16:41 +0100
Message-ID<mailman.82.1379432499.18130.python-list@python.org>
In reply to#54297
On 17 September 2013 15:52, Josef Perktold <josef.pktd@gmail.com> wrote:
>
> On the other hand, python-xy comes with MingW, and I never had any problems
> compiling pandas and statsmodels for any version combination of python and
> numpy that I tested (although 32 bit only so far, I never set up the
> Microsoft sdk).

Just out of interest: out of the box Python.org distutils is
incompatible with recent versions of MinGW. If Python-xy distributes
MinGW (and it works) then they're either creating a special patched
MinGW set up or patching distutils. I don't want to install Python-xy
myself since it'll clobber my existing Python installation but could
you answer the following for me:

1) What gcc version did Python-xy install for you?

2) Does the distutils.cygwincompiler module it installs contain the
following lines (around about line 300) specifically with the
'-mno-cygwin' option?

         self.set_executables(compiler='gcc -mno-cygwin -O -Wall',
                              compiler_so='gcc -mno-cygwin -mdll -O -Wall',
                              compiler_cxx='g++ -mno-cygwin -O -Wall',
                              linker_exe='gcc -mno-cygwin',
                              linker_so='%s -mno-cygwin %s %s'


Oscar

[toc] | [prev] | [next] | [standalone]


#54319

FromJosef Perktold <josef.pktd@gmail.com>
Date2013-09-17 16:15 +0000
Message-ID<mailman.83.1379434533.18130.python-list@python.org>
In reply to#54297
Oscar Benjamin <oscar.j.benjamin <at> gmail.com> writes:

> 
> On 17 September 2013 15:52, Josef Perktold <josef.pktd <at> gmail.com> wrote:
> >
> > On the other hand, python-xy comes with MingW, and I never had any problems
> > compiling pandas and statsmodels for any version combination of python and
> > numpy that I tested (although 32 bit only so far, I never set up the
> > Microsoft sdk).
> 
> Just out of interest: out of the box Python.org distutils is
> incompatible with recent versions of MinGW. If Python-xy distributes
> MinGW (and it works) then they're either creating a special patched
> MinGW set up or patching distutils. I don't want to install Python-xy
> myself since it'll clobber my existing Python installation but could
> you answer the following for me:
> 
> 1) What gcc version did Python-xy install for you?
> 
> 2) Does the distutils.cygwincompiler module it installs contain the
> following lines (around about line 300) specifically with the
> '-mno-cygwin' option?
> 
>          self.set_executables(compiler='gcc -mno-cygwin -O -Wall',
>                               compiler_so='gcc -mno-cygwin -mdll -O -Wall',
>                               compiler_cxx='g++ -mno-cygwin -O -Wall',
>                               linker_exe='gcc -mno-cygwin',
>                               linker_so='%s -mno-cygwin %s %s'

I installed python-xy 2 years ago with python 2.6 and didn't update, so my
information is not up-to-date

It looks like my MingW version uses mingw32-gcc-4.4.0.exe

for python 2.6 which came with python-xy:
        self.set_executables(compiler='gcc -mno-cygwin -O -Wall',
                             compiler_so='gcc -mno-cygwin -mdll -O -Wall',
                             compiler_cxx='g++ -mno-cygwin -O -Wall',
                             linker_exe='gcc -mno-cygwin',
                             linker_so='%s -mno-cygwin %s %s'
                                        % (self.linker_dll, shared_option,
                                           entry_point))

However, I'm running python 2.5, 2.7, 3.2 and 3.3 additionally. And they are
all python.org versions without any changes (except IDLE bugs :).
I don't have any compilation problems with any of them.

Until recently statsmodels used distutils from numpy which adds some patches
AFAIK. The current statsmodels setup.py just uses plain distutils and
setuptools. (The setup.py is largely copied from pandas which has a lot more
C extensions than statsmodels.)

numpy scipy binaries for Windows are still compiled against MingW 3.x, but
David Cournapeau is looking into upgrading to the latest MingW(-64) right now.

also (from some comments about problems a long time ago): I don't have
cygwin installed, so there is no confusion between cygwin and msys/mingw
paths possible. 

Josef

> 
> Oscar
> 



[toc] | [prev] | [next] | [standalone]


#54341

FromJosef Perktold <josef.pktd@gmail.com>
Date2013-09-18 00:03 +0000
Message-ID<mailman.96.1379462627.18130.python-list@python.org>
In reply to#54297
Josef Perktold <josef.pktd <at> gmail.com> writes:

> 
> Oscar Benjamin <oscar.j.benjamin <at> gmail.com> writes:
> 
> > 
> > On 17 September 2013 15:52, Josef Perktold <josef.pktd <at> gmail.com>
wrote:
> > >
> > > On the other hand, python-xy comes with MingW, and I never had any
problems
> > > compiling pandas and statsmodels for any version combination of python and
> > > numpy that I tested (although 32 bit only so far, I never set up the
> > > Microsoft sdk).
> > 
> > Just out of interest: out of the box Python.org distutils is
> > incompatible with recent versions of MinGW. If Python-xy distributes
> > MinGW (and it works) then they're either creating a special patched
> > MinGW set up or patching distutils. I don't want to install Python-xy
> > myself since it'll clobber my existing Python installation but could
> > you answer the following for me:
> > 
> > 1) What gcc version did Python-xy install for you?

I did a bit of homework. I didn't know about the -mno-cygwin issue since it
didn't affect me yet.

python-xy is staying below 4.6: GCC Core, G77, G++ 4.5.2 ; MingW 4.5.2.3 
https://code.google.com/p/pythonxy/wiki/StandardPlugins
and has open issue on it

pandas has an open issue where a user reported problems with --mno-cygwin.

Josef


> 
> Josef
> 
> > 
> > Oscar
> > 
> 
> 



[toc] | [prev] | [next] | [standalone]


#54288

FromDavide Dalmasso <davide.dalmasso@gmail.com>
Date2013-09-17 05:15 -0700
Message-ID<b9b212f1-6846-4bc9-a407-dc2b7d959aac@googlegroups.com>
In reply to#54232
On Monday, 16 September 2013 17:37:58 UTC+2, Davide Dalmasso  wrote:
> Hi,
> 
> 
> 
> I intalled an executable version of statsmodels library for Windows 32-bit.
> 
> When I import it in my Python Shell no problem occurs buy when I write:
> 
> 
> 
> import statsmodels.api as sm
> 
> 
> 
> the following error arises:
> 
> 
> 
> Traceback (most recent call last):
> 
>   File "<pyshell#1>", line 1, in <module>
> 
>     import statsmodels.api
> 
>   File "C:\Python33\lib\site-packages\statsmodels\api.py", line 1, in <module>
> 
>     from . import iolib, datasets, tools
> 
>   File "C:\Python33\lib\site-packages\statsmodels\iolib\__init__.py", line 1, in <module>
> 
>     from .foreign import StataReader, genfromdta, savetxt
> 
>   File "C:\Python33\lib\site-packages\statsmodels\iolib\foreign.py", line 20, in <module>
> 
>     import statsmodels.tools.data as data_util
> 
>   File "C:\Python33\lib\site-packages\statsmodels\tools\__init__.py", line 1, in <module>
> 
>     from .tools import add_constant, categorical
> 
>   File "C:\Python33\lib\site-packages\statsmodels\tools\tools.py", line 8, in <module>
> 
>     from scipy.interpolate import interp1d
> 
>   File "C:\Python33\lib\site-packages\scipy\interpolate\__init__.py", line 150, in <module>
> 
>     from .interpolate import *
> 
>   File "C:\Python33\lib\site-packages\scipy\interpolate\interpolate.py", line 12, in <module>
> 
>     import scipy.special as spec
> 
>   File "C:\Python33\lib\site-packages\scipy\special\__init__.py", line 529, in <module>
> 
>     from ._ufuncs import *
> 
> 
> 
> Why?
> 
> 
> 
> Thanks for any help you will want to give me!
> 
> 
> 
> Davide

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web