FAQ
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'

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedApr 26, '06 at 1:45p
activeApr 26, '06 at 1:45p
posts1
users1
websitepython.org

1 user in discussion

Jantod: 1 post

People

Translate

site design / logo © 2022 Grokbase