Re: [Numpy-discussion] Import error while freezing with cxfreeze

2013-04-10 Thread V. Armando Solé

Hello,

On 10/04/2013 11:13, Anand Gadiyar wrote:

On Friday, April 5, 2013, Anand Gadiyar wrote:


Hi all,

I have a small program that uses numpy and scipy. I ran into a
couple of errors while trying to use cxfreeze to create a
windows executable.

I'm running Windows 7 x64, Python 2.7.3 64-bit, Numpy 1.7.1rc1
64-bit, Scipy-0.11.0 64-bit, all binary installs from
>





If you intend to use that binary for yourself, please forget this message.

As far as I know, if you intend to distribute that binary *and* you use 
the numpy version built with MKL support, you need an MKL license from 
Intel.


Best regards,

Armando
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Import error while freezing with cxfreeze

2013-04-10 Thread Anand Gadiyar
Hi Brad,

On Fri, Apr 5, 2013 at 8:33 PM, Bradley M. Froehle
wrote:

> Hi Anand,
>
> On Friday, April 5, 2013, Anand Gadiyar wrote:
>
>> Hi all,
>>
>> I have a small program that uses numpy and scipy. I ran into a couple of
>> errors while trying to use cxfreeze to create a windows executable.
>>
>> I'm running Windows 7 x64, Python 2.7.3 64-bit, Numpy 1.7.1rc1 64-bit,
>> Scipy-0.11.0 64-bit, all binary installs from <
>> http://www.lfd.uci.edu/~gohlke/pythonlibs/>
>>
>> I was able to replicate this with scipy-0.12.0c1 as well.
>>
>> 1) "from scipy import constants" triggers the below:
>> Traceback (most recent call last):
>> File "D:\Python27\lib\site-packages\cx_Freeze\initscripts\Console.py",
>> line 27, in 
>> exec_code in m.__dict__
>> File "mSimpleGui.py", line 10, in 
>> File "mSystem.py", line 7, in 
>> File "D:\Python27\lib\site-packages\scipy\__init__.py", line 64, in
>> 
>> from numpy import show_config as show_numpy_config
>> File "D:\Python27\lib\site-packages\numpy\__init__.py", line 165, in
>> 
>> from core import *
>> AttributeError: 'module' object has no attribute 'sys'
>>
>
> It's a bug in cx_freeze that has been fixed in the development branch.
>
> See
> https://bitbucket.org/anthony_tuininga/cx_freeze/pull-request/17/avoid-polluting-extension-module-namespace/diff
>
>
>>
Thanks - the development branch fixed this.



> 2) "from scipy import interpolate" triggers the below:
>> Traceback (most recent call last):
>> File "D:\Python27\lib\site-packages\cx_Freeze\initscripts\Console.py",
>> line 27, in 
>> exec_code in m.__dict__
>> File "mSimpleGui.py", line 10, in 
>> File "mSystem.py", line 9, in 
>> File "mSensor.py", line 10, in 
>> File "D:\Python27\lib\site-packages\scipy\interpolate\__init__.py", line
>> 154, in 
>> from rbf import Rbf
>> File "D:\Python27\lib\site-packages\scipy\interpolate\rbf.py", line 50,
>> in 
>> from scipy import linalg
>> ImportError: cannot import name linalg
>>
>
> You might want to try the dev branch of cxfreeze to see if this has been
> fixed as well.
>
>

This one seems to be still an issue with the dev branch.

I tried "from scipy import linalg" in the cx freeze setup script and that
went through. I then tried using imp.find_module and that didn't work. So
maybe cxfreeze is the problem.

I'll report it on the cxfreeze list.

Thanks,
Anand
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Import error while freezing with cxfreeze

2013-04-05 Thread Bradley M. Froehle
Hi Anand,

On Friday, April 5, 2013, Anand Gadiyar wrote:

> Hi all,
>
> I have a small program that uses numpy and scipy. I ran into a couple of
> errors while trying to use cxfreeze to create a windows executable.
>
> I'm running Windows 7 x64, Python 2.7.3 64-bit, Numpy 1.7.1rc1 64-bit,
> Scipy-0.11.0 64-bit, all binary installs from <
> http://www.lfd.uci.edu/~gohlke/pythonlibs/>
>
> I was able to replicate this with scipy-0.12.0c1 as well.
>
> 1) "from scipy import constants" triggers the below:
> Traceback (most recent call last):
> File "D:\Python27\lib\site-packages\cx_Freeze\initscripts\Console.py",
> line 27, in 
> exec_code in m.__dict__
> File "mSimpleGui.py", line 10, in 
> File "mSystem.py", line 7, in 
> File "D:\Python27\lib\site-packages\scipy\__init__.py", line 64, in
> 
> from numpy import show_config as show_numpy_config
> File "D:\Python27\lib\site-packages\numpy\__init__.py", line 165, in
> 
> from core import *
> AttributeError: 'module' object has no attribute 'sys'
>

It's a bug in cx_freeze that has been fixed in the development branch.

See
https://bitbucket.org/anthony_tuininga/cx_freeze/pull-request/17/avoid-polluting-extension-module-namespace/diff


> 2) "from scipy import interpolate" triggers the below:
> Traceback (most recent call last):
> File "D:\Python27\lib\site-packages\cx_Freeze\initscripts\Console.py",
> line 27, in 
> exec_code in m.__dict__
> File "mSimpleGui.py", line 10, in 
> File "mSystem.py", line 9, in 
> File "mSensor.py", line 10, in 
> File "D:\Python27\lib\site-packages\scipy\interpolate\__init__.py", line
> 154, in 
> from rbf import Rbf
> File "D:\Python27\lib\site-packages\scipy\interpolate\rbf.py", line 50, in
> 
> from scipy import linalg
> ImportError: cannot import name linalg
>

You might want to try the dev branch of cxfreeze to see if this has been
fixed as well.

Brad
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion