I have ran into this during exporting my script (which uses numpy
and scipy
libraries) via py2exe
:
Traceback (most recent call last):
File "imPok.py", line 3, in <module>
File "scipy\misc\__init__.pyc", line 49, in <module>
File "scipy\special\__init__.pyc", line 603, in <module>
File "scipy\special\basic.pyc", line 18, in <module>
File "scipy\special\orthogonal.pyc", line 101, in <module>
File "scipy\linalg\__init__.pyc", line 188, in <module>
File "scipy\linalg\_decomp_update.pyc", line 12, in <module>
File "scipy\linalg\_decomp_update.pyc", line 10, in __load
File "scipy/linalg/_decomp_update.pyx", line 1, in init scipy.linalg._decomp_update (scipy\linalg\_decomp_update.c:35768)
ImportError: No module named cython_blas
Tried:
- installing cython - no use
- removing
scipy
dependencies - that worked, i.e. the trouble is in cooperation betweenscipy
andpy2exe
. - applying the solution of this question - no use
Questions:
- how can I make that work?
- what I should/shouldn't do in general to avoid this problems?
Appendix:
These are the problematic lines:
from scipy.misc import imread
import numpy as np
I actually haven't ask for scipy.linalg
and scipy.special
and yet the py2exe
wants them.
I ran into this problem today, and found a more thorough solution from here.
Then, in your setup.py script, use: