Search code examples
pythonnumpycx-freezepython-3.6

error message Missing required dependencies, import error: Missing required dependencies ['numpy' ] when I try and freeze an executable


I'm trying to make an executable program using python 3.6 and the only software I have found that can do this is cx_Freeze. However I am having the problem every time I run "python setup.py build" in CMD I get an error when trying to open my application.

Missing required dependencies, import error: Missing required dependencies ['numpy' ] when I try and freeze an executable.

Here is my setup.py

import cx_Freeze
from cx_Freeze import setup
from cx_Freeze import Executable
import sys
import matplotlib
import pandas

import os

import os.path
PYTHON_INSTALL_DIR = os.path.dirname(os.path.dirname(os.__file__))
os.environ['TCL_LIBRARY'] = os.path.join(PYTHON_INSTALL_DIR, 'tcl', 'tcl8.6')
os.environ['TK_LIBRARY'] = os.path.join(PYTHON_INSTALL_DIR, 'tcl', 'tk8.6')

base = None

if sys.platform == 'win32':
    base = "Win32GUI"

executables = [cx_Freeze.Executable("EXE.py",icon = 'RomacLogo.ico', base=base)]

build_exe_options = {"packages": ["numpy"]}

cx_Freeze.setup(
    name = "DAGM",
    options = {"build.exe":{"packages":["tkinter", "matplotlib",'numpy', "numpy.lib.format", "pandas", "glob"], "include_files":["RomacLogo.ico"]}},
    version = "0.01",
    description = "Data Transfer and Analysis Application",
    executables = executables
)

Are there any other freeze programs I could use to make an executable besides cx_freeze??

Any help would be much appreciated!


Solution

  • RESOLVED-KINDA... I created a virtual environment in python 3.5.0 and was able to run py-installer for python 3.5. Couldn't get cx_Freeze to work the numpy dependencies still kept being a problem.