Hello: I was attempting to use cx_freeze to create a stand-alone application that uses scipy, but ran into a problem. When I attempt to run the frozen application, I get the error: scipy\interpolate\polyint.py Cannot import name factorial I looked at the scipy package and the factorial function is in scipy.misc.common.py but the file scipy.interpolate.polyint.py has the line: from scipy import factorial So the polyint script is looking for the factorial function in some other place than its actual physical location. I guess scipy somehow inserts the factorial function in the correct namespace so that it runs correctly. Is there a way to get scipy and cx_freeze to get along? Thanks for your help in advance. Regards, Craig Howard
Hi Craig, I am wondering whether you were able to solve your problem, since I have exactly the same one! (under linux platform) ----------------------------------------------- Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/cx_Freeze/initscripts/Console.py", line 29, in <module> exec code in m.__dict__ File "at.py", line 12, in <module> from scipy.signal import butter File "/usr/lib/python2.6/dist-packages/scipy/signal/__init__.py", line 11, in <module> from ltisys import * File "/usr/lib/python2.6/dist-packages/scipy/signal/ltisys.py", line 9, in <module> import scipy.interpolate as interpolate File "/usr/lib/python2.6/dist-packages/scipy/interpolate/__init__.py", line 15, in <module> from polyint import * File "/usr/lib/python2.6/dist-packages/scipy/interpolate/polyint.py", line 2, in <module> from scipy import factorial ImportError: cannot import name factorial ----------------------------------------------------- Thanks a lot! Rafael Craig Howard-2 wrote:
Hello:
I was attempting to use cx_freeze to create a stand-alone application that uses scipy, but ran into a problem. When I attempt to run the frozen application, I get the error: scipy\interpolate\polyint.py Cannot import name factorial
I looked at the scipy package and the factorial function is in scipy.misc.common.py but the file scipy.interpolate.polyint.py has the line: from scipy import factorial
So the polyint script is looking for the factorial function in some other place than its actual physical location. I guess scipy somehow inserts the factorial function in the correct namespace so that it runs correctly. Is there a way to get scipy and cx_freeze to get along? Thanks for your help in advance.
Regards, Craig Howard _______________________________________________ SciPy-User mailing list SciPy-User@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-user
-- View this message in context: http://old.nabble.com/Using-Pyinstaller-or-cx_freeze-with-scipy-tp27786679p3... Sent from the Scipy-User mailing list archive at Nabble.com.
On Thu, Mar 24, 2011 at 10:03 AM, rafiki38 <rafiki38@hotmail.com> wrote:
Hi Craig, I am wondering whether you were able to solve your problem, since I have exactly the same one! (under linux platform) ----------------------------------------------- Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/cx_Freeze/initscripts/Console.py", line 29, in <module> exec code in m.__dict__ File "at.py", line 12, in <module> from scipy.signal import butter File "/usr/lib/python2.6/dist-packages/scipy/signal/__init__.py", line 11, in <module> from ltisys import * File "/usr/lib/python2.6/dist-packages/scipy/signal/ltisys.py", line 9, in <module> import scipy.interpolate as interpolate File "/usr/lib/python2.6/dist-packages/scipy/interpolate/__init__.py", line 15, in <module> from polyint import * File "/usr/lib/python2.6/dist-packages/scipy/interpolate/polyint.py", line 2, in <module> from scipy import factorial ImportError: cannot import name factorial -----------------------------------------------------
The fix is to change line 2 of polyint.py to "from scipy.misc import factorial". But this is already the case in 0.9.0 and current master, so just upgrading will also fix this. Ralf
Craig Howard-2 wrote:
Hello:
I was attempting to use cx_freeze to create a stand-alone application that uses scipy, but ran into a problem. When I attempt to run the frozen application, I get the error: scipy\interpolate\polyint.py Cannot import name factorial
I looked at the scipy package and the factorial function is in scipy.misc.common.py but the file scipy.interpolate.polyint.py has the line: from scipy import factorial
So the polyint script is looking for the factorial function in some other place than its actual physical location. I guess scipy somehow inserts the factorial function in the correct namespace so that it runs correctly. Is there a way to get scipy and cx_freeze to get along? Thanks for your help in advance.
Regards, Craig Howard _______________________________________________ SciPy-User mailing list SciPy-User@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-user
-- View this message in context: http://old.nabble.com/Using-Pyinstaller-or-cx_freeze-with-scipy-tp27786679p3... Sent from the Scipy-User mailing list archive at Nabble.com.
_______________________________________________ SciPy-User mailing list SciPy-User@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-user
participants (3)
-
Craig
-
rafiki38
-
Ralf Gommers