469,607 Members | 2,039 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,607 developers. It's quick & easy.

scipy and py2exe

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'

Apr 26 '06 #1
0 1475

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by RJS | last post: by
2 posts views Thread by Stefan Behrens | last post: by
reply views Thread by Kathleen Kudzma | last post: by
8 posts views Thread by Kathleen Kudzma | last post: by
6 posts views Thread by Luc Saffre | last post: by
1 post views Thread by tkpmep | last post: by
reply views Thread by Julien Fiore | last post: by
2 posts views Thread by robert | last post: by
2 posts views Thread by Frank Moyles | last post: by
reply views Thread by guiromero | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.