After building my exe, when I run it I get an error saying that it failed to import numpy.core.multiarray.
What I have already tested:
- Updated numpy to latest version
- Checked if I have more than one version of numpy
- The file multiarray is inside the build/../numpy/core/multiarray
- If i run python on console i can "from numpy.core import multiarray" without any problem
Packages I use: Easygui, Opencv2, pytesseract, os, pillow, regex
I'm running python 3.6.1 on W10
This is my setup.py.
from cx_Freeze import setup, Executable
import os
os.environ['TCL_LIBRARY'] = r'C:\Users\Farinha\Anaconda3\tcl\tcl8.6'
os.environ['TK_LIBRARY'] = r'C:\Users\Farinha\Anaconda3\tcl\tk8.6'
includes = []
include_files = [r"C:\Users\Farinha\Anaconda3\DLLs\tcl86t.dll", \
r"C:\Users\Farinha\Anaconda3\DLLs\tk86t.dll"]
setup(name='InstantScale',
version = '0.1',
description='Parse stuff',
options = {"build_exe": {"includes": includes, "include_files": include_files}},
executables = [Executable("main.py")])
And the error when i run a bat to pause the console
ImportError: numpy.core.multiarray failed to import
Traceback (most recent call last):
File "C:\Users\Farinha\Anaconda3\lib\site-packages\cx_Freeze\initscripts\__startup__.py", line 14, in run
module.run()
File "C:\Users\Farinha\Anaconda3\lib\site-packages\cx_Freeze\initscripts\Console.py", line 26, in run
exec(code, m.__dict__)
File "main.py", line 2, in <module>
ImportError: numpy.core.multiarray failed to import
All help welcome, thanks in advance