scipy and py2exe

J

jantod

I am trying to package my application with py2exe. Unfortunately it
uses both scipy/numpy and numarray so I'm having to jump through a lot
of hoops to get it going. I'm getting problems packaging an app that
uses only scipy. See below.

Thanks!
Janto

===setup.py===
from distutils.core import setup
import py2exe

import sys
sys.argv.append('py2exe')

setup(
windows = [{
"script": "test.py",
}],

options = dict(
py2exe = dict(
ascii=1,
skip_archive = 1,
packages = ["scipy"],
excludes = [
'_gtkagg',
'_tkagg',
'tcl',
'Tkconstants',
'Tkinter',
'tcl',
],
)
),
)

===test.py===
import time
import scipy
print scipy.array([1,2,3])
time.sleep(1)

===error file===
import core -> failed: No module named _internal
import lib -> failed: 'module' object has no attribute '_ARRAY_API'
import linalg -> failed: 'module' object has no attribute '_ARRAY_API'
import dft -> failed: 'module' object has no attribute '_ARRAY_API'
import random -> failed: 'module' object has no attribute 'dtype'
Traceback (most recent call last):
File "test.py", line 2, in ?
File "scipy\__init__.pyc", line 25, in ?
numpy name space
File "numpy\__init__.pyc", line 49, in ?

File "numpy\add_newdocs.pyc", line 2, in ?
`ï¾Cc
File "numpy\lib\__init__.pyc", line 5, in ?

File "numpy\lib\type_check.pyc", line 8, in ?

File "numpy\core\__init__.pyc", line 6, in ?

File "numpy\core\umath.pyc", line 12, in ?

File "numpy\core\umath.pyc", line 10, in __load

AttributeError: 'module' object has no attribute '_ARRAY_API'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top