Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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!

like image 512
Markus T. Avatar asked Jan 22 '26 03:01

Markus T.


1 Answers

Find the numpy submodule named _methods in Lib/site-packages/numpy/core/ copy and paste it to build/exe.win64-3.6/numpy/core/.

like image 163
James R. Avatar answered Jan 23 '26 15:01

James R.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!