[GH-ISSUE #71] How to create a standalone python executable with pymc3 package? #69

Closed
opened 2026-02-26 12:20:22 +03:00 by kerem · 11 comments
Owner

Originally created by @dvimal27 on GitHub (Sep 20, 2019).
Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/71

I have created a mathematical model in python. I want to make a standalone python executable for my model. The python script uses several python libraries like numpy, pandas, pymc3. I tried to make a python executable using pyinstaller and also auto-py-to-exe. In both cases, it failed to create the executable. The error occurs while importing the pymc3 module (theano library). My primary model is dependent on pymc3 module. I cannot bypass this module. Could anyone please help me to sort out this issue?

Here is the error message I get when I execute the .exe file,

WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
c:\python\lib\site-packages\PyInstaller\loader\pyimod03_importers.py:621: MatplotlibDeprecationWarning:
The MATPLOTLIBDATA environment variable was deprecated in Matplotlib 3.1 and will be removed in 3.3.
  exec(bytecode, module.__dict__)
Traceback (most recent call last):
  File "sample.py", line 46, in <module>
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "c:\python\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 621, in exec_module
    exec(bytecode, module.__dict__)
  File "site-packages\pymc3\__init__.py", line 11, in <module>
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "c:\python\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 621, in exec_module
    exec(bytecode, module.__dict__)
  File "site-packages\pymc3\stats.py", line 20, in <module>
  File "site-packages\pkg_resources\__init__.py", line 481, in get_distribution
  File "site-packages\pkg_resources\__init__.py", line 357, in get_provider
  File "site-packages\pkg_resources\__init__.py", line 900, in require
  File "site-packages\pkg_resources\__init__.py", line 786, in resolve
pkg_resources.DistributionNotFound: The 'scipy' distribution was not found and is required by the application
[13796] Failed to execute script sample

Here is the python script,

class modelFit:
	# Initialises the attributes
	def __init__(self, x, y):
		self.x = x
		self.y = y
		
	# Performs the Bayes estimation
	def coeffEstimation(self):
		X = np.array(self.x)
		Y = np.array(self.y)

		with pm.Model() as linearRegModel:
			# Define priors
			#regCoeff = pm.HalfNormal('regCoeff', sd = 20, shape=X.shape[1])
			regCoeff = pm.Uniform('regCoeff', lower = 0, upper = 100, shape=X.shape[1])

			# Standard deviation
			sigma = pm.HalfNormal('sigma', sd = 5)
	
			# Estimate of mean
			mean = pm.math.dot(X, regCoeff)
	
			# Likelihood estimate
			likelihood = pm.Normal('Y_estimated', mu = mean, sd = sigma, observed = Y)
	
			# Sampler
			step = pm.NUTS()

			# Posterior distribution
			linearTrace = pm.sample(draws = 500, chains = 1,
									tune = 500, nuts_kwargs=dict(target_accept=0.95))

		with open('Summary.txt', 'w') as f:
			print(pm.summary(linearTrace).round(3), file=f)
			diverging = linearTrace['diverging']
			print('Number of Divergent Chains: {}'.format(diverging.nonzero()[0].size), file=f)
			divergingPer = diverging.nonzero()[0].size / len(linearTrace) * 100
			print('Percentage of Divergent Chains: {:.1f}'.format(divergingPer), file=f)

		print('Bayesian Inference Done! Exporting the results, Please hold on!')
		return(linearTrace)


import theano.tensor.shared_randomstreams
import scipy
import pymc3 as pm
import numpy as np
import pandas as pd
dataLocation = './input/'
inputData = pd.read_excel(dataLocation + 'input.xlsx')
sizeInputData = inputData.shape
x = inputData.iloc[:,1:sizeInputData[1]]
y = inputData.iloc[:,0]


# Executes the Bayes method
linReg = modelFit(x, y)
regTrace = linReg.coeffEstimation()
Originally created by @dvimal27 on GitHub (Sep 20, 2019). Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/71 I have created a mathematical model in python. I want to make a standalone python executable for my model. The python script uses several python libraries like numpy, pandas, pymc3. I tried to make a python executable using pyinstaller and also auto-py-to-exe. In both cases, it failed to create the executable. The error occurs while importing the pymc3 module (theano library). My primary model is dependent on pymc3 module. I cannot bypass this module. Could anyone please help me to sort out this issue? Here is the error message I get when I execute the .exe file, ``` WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions. c:\python\lib\site-packages\PyInstaller\loader\pyimod03_importers.py:621: MatplotlibDeprecationWarning: The MATPLOTLIBDATA environment variable was deprecated in Matplotlib 3.1 and will be removed in 3.3. exec(bytecode, module.__dict__) Traceback (most recent call last): File "sample.py", line 46, in <module> File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 677, in _load_unlocked File "c:\python\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 621, in exec_module exec(bytecode, module.__dict__) File "site-packages\pymc3\__init__.py", line 11, in <module> File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 677, in _load_unlocked File "c:\python\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 621, in exec_module exec(bytecode, module.__dict__) File "site-packages\pymc3\stats.py", line 20, in <module> File "site-packages\pkg_resources\__init__.py", line 481, in get_distribution File "site-packages\pkg_resources\__init__.py", line 357, in get_provider File "site-packages\pkg_resources\__init__.py", line 900, in require File "site-packages\pkg_resources\__init__.py", line 786, in resolve pkg_resources.DistributionNotFound: The 'scipy' distribution was not found and is required by the application [13796] Failed to execute script sample ``` Here is the python script, ``` class modelFit: # Initialises the attributes def __init__(self, x, y): self.x = x self.y = y # Performs the Bayes estimation def coeffEstimation(self): X = np.array(self.x) Y = np.array(self.y) with pm.Model() as linearRegModel: # Define priors #regCoeff = pm.HalfNormal('regCoeff', sd = 20, shape=X.shape[1]) regCoeff = pm.Uniform('regCoeff', lower = 0, upper = 100, shape=X.shape[1]) # Standard deviation sigma = pm.HalfNormal('sigma', sd = 5) # Estimate of mean mean = pm.math.dot(X, regCoeff) # Likelihood estimate likelihood = pm.Normal('Y_estimated', mu = mean, sd = sigma, observed = Y) # Sampler step = pm.NUTS() # Posterior distribution linearTrace = pm.sample(draws = 500, chains = 1, tune = 500, nuts_kwargs=dict(target_accept=0.95)) with open('Summary.txt', 'w') as f: print(pm.summary(linearTrace).round(3), file=f) diverging = linearTrace['diverging'] print('Number of Divergent Chains: {}'.format(diverging.nonzero()[0].size), file=f) divergingPer = diverging.nonzero()[0].size / len(linearTrace) * 100 print('Percentage of Divergent Chains: {:.1f}'.format(divergingPer), file=f) print('Bayesian Inference Done! Exporting the results, Please hold on!') return(linearTrace) import theano.tensor.shared_randomstreams import scipy import pymc3 as pm import numpy as np import pandas as pd dataLocation = './input/' inputData = pd.read_excel(dataLocation + 'input.xlsx') sizeInputData = inputData.shape x = inputData.iloc[:,1:sizeInputData[1]] y = inputData.iloc[:,0] # Executes the Bayes method linReg = modelFit(x, y) regTrace = linReg.coeffEstimation() ```
kerem closed this issue 2026-02-26 12:20:22 +03:00
Author
Owner

@brentvollebregt commented on GitHub (Sep 20, 2019):

Did you read my post on Issues When Using auto-py-to-exe? This is linked at the bottom of the UI after every build and in the README of this repository; I highly recommend you give it a read.

In the post I discuss the error of modules not being found. This is very similar to your issue here so you could try to add scipy as a hidden import.

Also is this actually an issue with auto-py-to-exe? I can't seem to see anything directly wrong with the tool here.

<!-- gh-comment-id:533736044 --> @brentvollebregt commented on GitHub (Sep 20, 2019): Did you read my post on [Issues When Using auto-py-to-exe](https://nitratine.net/blog/post/issues-when-using-auto-py-to-exe/)? This is linked at the bottom of the UI after every build and in the README of this repository; I highly recommend you give it a read. In the post I discuss the error of [modules not being found](https://nitratine.net/blog/post/issues-when-using-auto-py-to-exe/#modulenotfounderror-no-module-named-x-importerror-no-module-named-x). This is very similar to your issue here so you could try to add `scipy` as a hidden import. Also is this actually an issue with auto-py-to-exe? I can't seem to see anything directly wrong with the tool here.
Author
Owner

@dvimal27 commented on GitHub (Sep 23, 2019):

Thank you.
I've added scipy as hidden import. But, still the same issue persists.

<!-- gh-comment-id:534039417 --> @dvimal27 commented on GitHub (Sep 23, 2019): Thank you. I've added scipy as hidden import. But, still the same issue persists.
Author
Owner

@brentvollebregt commented on GitHub (Sep 23, 2019):

Is it the exact same error? If so, are there any warnings regarding scipy in the build output?

You should be able to copy the PyInstaller command that is being executed from the UI. When executing it, do you get the same results?

<!-- gh-comment-id:534058788 --> @brentvollebregt commented on GitHub (Sep 23, 2019): Is it the exact same error? If so, are there any warnings regarding scipy in the build output? You should be able to copy the PyInstaller command that is being executed from the UI. When executing it, do you get the same results?
Author
Owner

@dvimal27 commented on GitHub (Sep 23, 2019):

Yeah. It's the same error.

<!-- gh-comment-id:534097935 --> @dvimal27 commented on GitHub (Sep 23, 2019): Yeah. It's the same error.
Author
Owner

@brentvollebregt commented on GitHub (Sep 24, 2019):

Ok, and my other questions? Warnings? When executing the pyinstaller command, do you get the same result?

<!-- gh-comment-id:534337540 --> @brentvollebregt commented on GitHub (Sep 24, 2019): Ok, and my other questions? Warnings? When executing the pyinstaller command, do you get the same result?
Author
Owner

@dvimal27 commented on GitHub (Sep 24, 2019):

I get the same result.

Here is the error message, when I run the .exe file

WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
c:\python\lib\site-packages\PyInstaller\loader\pyimod03_importers.py:621: MatplotlibDeprecationWarning:
The MATPLOTLIBDATA environment variable was deprecated in Matplotlib 3.1 and will be removed in 3.3.
  exec(bytecode, module.__dict__)
Traceback (most recent call last):
  File "sample.py", line 44, in <module>
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "c:\python\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 621, in exec_module
    exec(bytecode, module.__dict__)
  File "site-packages\pymc3\__init__.py", line 11, in <module>
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "c:\python\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 621, in exec_module
    exec(bytecode, module.__dict__)
  File "site-packages\pymc3\stats.py", line 20, in <module>
  File "site-packages\pkg_resources\__init__.py", line 481, in get_distribution
  File "site-packages\pkg_resources\__init__.py", line 357, in get_provider
  File "site-packages\pkg_resources\__init__.py", line 900, in require
  File "site-packages\pkg_resources\__init__.py", line 786, in resolve
pkg_resources.DistributionNotFound: The 'scipy' distribution was not found and is required by the application
[1888] Failed to execute script sample

Here is the Output from Pyinstaller UI,

Running auto-py-to-exe v2.6.5
Building in the current instances temporary directory at C:\Users\Vimal\AppData\Local\Temp\tmpm_i752tq
To get a new temporary directory, restart this application
Recursion Limit is set to 5000
Executing: pyinstaller -y --hidden-import scipy  "C:/Users/Vimal/Workspace/Python/WrapUp/sample.py"
54363 INFO: PyInstaller: 4.0.dev0+8196c57ab
54363 INFO: Python: 3.7.4
54365 INFO: Platform: Windows-10-10.0.17763-SP0
54374 INFO: wrote C:\Users\Vimal\AppData\Local\Temp\tmpm_i752tq\sample.spec
54379 INFO: UPX is not available.
54381 INFO: Extending PYTHONPATH with paths
['C:\\Users\\Vimal\\Workspace\\Python\\WrapUp',
 'C:\\Users\\Vimal\\AppData\\Local\\Temp\\tmpm_i752tq']
54381 INFO: checking Analysis
54381 INFO: Building Analysis because Analysis-00.toc is non existent
54381 INFO: Initializing module dependency graph...
54391 INFO: Caching module graph hooks...
54407 INFO: Analyzing base_library.zip ...
64320 INFO: Caching module dependency graph...
64559 INFO: running Analysis Analysis-00.toc
64609 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
  required by c:\python\python.exe
65304 INFO: Analyzing C:\Users\Vimal\Workspace\Python\WrapUp\sample.py
67366 INFO: Processing pre-find module path hook   distutils
67369 INFO: distutils: retargeting to non-venv dir 'c:\\python\\lib'
72324 INFO: Processing pre-find module path hook   site
72329 INFO: site: retargeting to fake-dir 'c:\\python\\lib\\site-packages\\PyInstaller\\fake-modules'
91794 INFO: Processing pre-safe import module hook   setuptools.extern.six.moves
102880 INFO: Processing pre-safe import module hook   six.moves
137475 INFO: Processing pre-safe import module hook   urllib3.packages.six.moves
216838 INFO: Processing module hooks...
216838 INFO: Loading module hook "hook-certifi.py"...
217811 INFO: Loading module hook "hook-distutils.py"...
217819 INFO: Loading module hook "hook-django.core.cache.py"...
218240 INFO: Loading module hook "hook-django.core.mail.py"...
218370 INFO: Loading module hook "hook-django.core.management.py"...
218427 INFO: Excluding import 'IPython'
218437 INFO: Excluding import 'matplotlib'
218444 INFO: Excluding import 'tkinter'
218453 INFO: Loading module hook "hook-django.db.backends.py"...
221975 WARNING: Hidden import "django.db.backends.__pycache__.base" not found!
221975 INFO: Loading module hook "hook-django.py"...
234358 INFO: Determining a mapping of distributions to packages...
268202 INFO: Packages required by django:
['pytz', 'sqlparse']
268206 WARNING: No django root directory could be found!
288371 INFO: Loading module hook "hook-encodings.py"...
288633 INFO: Loading module hook "hook-gevent.py"...
290599 WARNING: Unable to find package for requirement greenlet from package gevent.
290599 INFO: Packages required by gevent:
['cffi']
298265 INFO: Loading module hook "hook-h5py.py"...
298268 INFO: Loading module hook "hook-IPython.py"...
298363 INFO: Excluding import 'PyQt4'
298379 INFO:   Removing import of PyQt4 from module IPython.external.qt_loaders
298380 INFO: Excluding import 'gtk'
298394 INFO: Excluding import 'PyQt5'
298404 INFO:   Removing import of PyQt5.QtCore from module IPython.external.qt_loaders
298407 INFO:   Removing import of PyQt5.QtSvg from module IPython.external.qt_loaders
298409 INFO:   Removing import of PyQt5.QtGui from module IPython.external.qt_loaders
298409 INFO:   Removing import of PyQt5.QtWidgets from module IPython.external.qt_loaders
298410 INFO:   Removing import of PyQt5 from module IPython.external.qt_loaders
298412 INFO: Excluding import 'PySide'
298434 INFO:   Removing import of PySide from module IPython.external.qt_loaders
298436 INFO: Excluding import 'matplotlib'
298447 INFO:   Removing import of matplotlib from module IPython.core.pylabtools
298447 INFO:   Removing import of matplotlib._pylab_helpers from module IPython.core.pylabtools
298452 INFO:   Removing import of matplotlib.figure from module IPython.core.pylabtools
298452 INFO:   Removing import of matplotlib.pyplot from module IPython.core.pylabtools
298454 INFO: Excluding import 'tkinter'
298467 INFO:   Removing import of tkinter from module IPython.lib.clipboard
298469 INFO: Loading module hook "hook-jedi.py"...
298880 INFO: Loading module hook "hook-jinja2.py"...
298945 INFO: Loading module hook "hook-jsonschema.py"...
298958 INFO: Loading module hook "hook-lib2to3.py"...
298982 INFO: Loading module hook "hook-matplotlib.backends.py"...
302861 INFO:   Matplotlib backend "GTK3Agg": ignored
    cairo backend requires that pycairo>=1.11.0 or cairocffiis installed
303678 INFO:   Matplotlib backend "GTK3Cairo": ignored
    cairo backend requires that pycairo>=1.11.0 or cairocffiis installed
304980 INFO:   Matplotlib backend "MacOSX": ignored
    cannot import name '_macosx' from 'matplotlib.backends' (c:\python\lib\site-packages\matplotlib\backends\__init__.py)
308527 INFO:   Matplotlib backend "nbAgg": added
310463 INFO:   Matplotlib backend "Qt4Agg": added
311626 INFO:   Matplotlib backend "Qt4Cairo": ignored
    cairo backend requires that pycairo>=1.11.0 or cairocffiis installed
312642 INFO:   Matplotlib backend "Qt5Agg": added
313478 INFO:   Matplotlib backend "Qt5Cairo": ignored
    cairo backend requires that pycairo>=1.11.0 or cairocffiis installed
314742 INFO:   Matplotlib backend "TkAgg": added
315847 INFO:   Matplotlib backend "TkCairo": ignored
    cairo backend requires that pycairo>=1.11.0 or cairocffiis installed
317478 INFO:   Matplotlib backend "WebAgg": added
318568 INFO:   Matplotlib backend "WX": ignored
    No module named 'wx'
319339 INFO:   Matplotlib backend "WXAgg": ignored
    No module named 'wx'
320141 INFO:   Matplotlib backend "WXCairo": ignored
    No module named 'wx'
321020 INFO:   Matplotlib backend "agg": added
321734 INFO:   Matplotlib backend "cairo": ignored
    cairo backend requires that pycairo>=1.11.0 or cairocffiis installed
322824 INFO:   Matplotlib backend "pdf": added
323852 INFO:   Matplotlib backend "pgf": added
324616 INFO:   Matplotlib backend "ps": added
325426 INFO:   Matplotlib backend "svg": added
326406 INFO:   Matplotlib backend "template": added
327523 INFO: Loading module hook "hook-matplotlib.py"...
328133 INFO: Loading module hook "hook-nbconvert.py"...
328191 INFO: Loading module hook "hook-nbformat.py"...
328215 INFO: Loading module hook "hook-netCDF4.py"...
328289 WARNING: Hidden import "netcdftime" not found!
328289 INFO: Loading module hook "hook-notebook.py"...
331318 INFO: Loading module hook "hook-numpy.core.py"...
331516 INFO: Loading module hook "hook-numpy.py"...
331519 INFO: Loading module hook "hook-openpyxl.py"...
331588 INFO: Loading module hook "hook-pandas.py"...
339707 INFO: Loading module hook "hook-patsy.py"...
339710 INFO: Loading module hook "hook-PIL.Image.py"...
341171 INFO: Loading module hook "hook-PIL.py"...
341182 INFO: Excluding import 'PyQt4'
341191 INFO:   Removing import of PyQt4 from module PIL.ImageQt
341194 INFO: Import to be excluded not found: 'FixTk'
341195 INFO: Excluding import 'PySide'
341217 INFO:   Removing import of PySide from module PIL.ImageQt
341220 INFO: Excluding import 'PyQt5'
341236 INFO:   Removing import of PyQt5.QtCore from module PIL.ImageQt
341236 INFO:   Removing import of PyQt5.QtGui from module PIL.ImageQt
341240 INFO: Excluding import 'tkinter'
341257 INFO:   Removing import of tkinter from module PIL.ImageTk
341258 INFO: Loading module hook "hook-PIL.SpiderImagePlugin.py"...
341279 INFO: Import to be excluded not found: 'FixTk'
341280 INFO: Excluding import 'tkinter'
341291 INFO: Loading module hook "hook-pkg_resources.py"...
342764 INFO: Processing pre-safe import module hook   win32com
342900 INFO: Processing pre-safe import module hook   win32com
343168 INFO: Excluding import '__main__'
343185 INFO:   Removing import of __main__ from module pkg_resources
343186 INFO: Loading module hook "hook-pycparser.py"...
343188 INFO: Loading module hook "hook-pydoc.py"...
343190 INFO: Loading module hook "hook-pygments.py"...
351296 INFO: Loading module hook "hook-PyQt5.py"...
352885 INFO: Loading module hook "hook-PyQt5.QtCore.py"...
353125 INFO: Loading module hook "hook-PyQt5.QtGui.py"...
353431 INFO: Loading module hook "hook-PyQt5.QtSvg.py"...
354461 INFO: Loading module hook "hook-PyQt5.QtWidgets.py"...
355129 INFO: Loading module hook "hook-pytz.py"...
355257 INFO: Loading module hook "hook-scipy.io.matlab.py"...
355263 INFO: Loading module hook "hook-scipy.linalg.py"...
355266 INFO: Loading module hook "hook-scipy.py"...
355283 INFO: Loading module hook "hook-scipy.sparse.csgraph.py"...
355299 INFO: Loading module hook "hook-scipy.special._ellip_harm_2.py"...
355302 INFO: Loading module hook "hook-scipy.special._ufuncs.py"...
355304 INFO: Loading module hook "hook-setuptools.py"...
358147 INFO: Loading module hook "hook-shelve.py"...
358201 INFO: Loading module hook "hook-sqlite3.py"...
358423 INFO: Loading module hook "hook-sysconfig.py"...
358429 INFO: Loading module hook "hook-xml.dom.domreg.py"...
358431 INFO: Loading module hook "hook-xml.etree.cElementTree.py"...
358433 INFO: Loading module hook "hook-xml.py"...
358435 INFO: Loading module hook "hook-zmq.py"...
362198 INFO: Loading module hook "hook-_tkinter.py"...
362529 INFO: checking Tree
362529 INFO: Building Tree because Tree-00.toc is non existent
362530 INFO: Building Tree Tree-00.toc
362699 INFO: checking Tree
362699 INFO: Building Tree because Tree-01.toc is non existent
362700 INFO: Building Tree Tree-01.toc
362843 INFO: Loading module hook "hook-django.db.backends.mysql.base.py"...
362852 INFO: Loading module hook "hook-django.db.backends.oracle.base.py"...
363110 INFO: Looking for ctypes DLLs
363737 INFO: Analyzing run-time hooks ...
363804 INFO: Including run-time hook 'pyi_rth_pkgres.py'
363821 INFO: Including run-time hook 'pyi_rth_multiprocessing.py'
363848 INFO: Including run-time hook 'pyi_rth_traitlets.py'
363863 INFO: Including run-time hook 'pyi_rth__tkinter.py'
363881 INFO: Including run-time hook 'pyi_rth_certifi.py'
363900 INFO: Including run-time hook 'pyi_rth_pyqt5.py'
363915 INFO: Including run-time hook 'pyi_rth_mplconfig.py'
363934 INFO: Including run-time hook 'pyi_rth_mpldata.py'
364081 INFO: Looking for dynamic libraries
372132 WARNING: lib not found: libzmq.cp37-win_amd64.pyd dependency of c:\python\lib\site-packages\zmq\backend\cython\_proxy_steerable.cp37-win_amd64.pyd
372141 WARNING: lib not found: libzmq.cp37-win_amd64.pyd dependency of c:\python\lib\site-packages\zmq\backend\cython\utils.cp37-win_amd64.pyd
372151 WARNING: lib not found: libzmq.cp37-win_amd64.pyd dependency of c:\python\lib\site-packages\zmq\backend\cython\socket.cp37-win_amd64.pyd
372173 WARNING: lib not found: libzmq.cp37-win_amd64.pyd dependency of c:\python\lib\site-packages\zmq\backend\cython\error.cp37-win_amd64.pyd
372186 WARNING: lib not found: libzmq.cp37-win_amd64.pyd dependency of c:\python\lib\site-packages\zmq\backend\cython\_version.cp37-win_amd64.pyd
372195 WARNING: lib not found: libzmq.cp37-win_amd64.pyd dependency of c:\python\lib\site-packages\zmq\backend\cython\_device.cp37-win_amd64.pyd
372207 WARNING: lib not found: libzmq.cp37-win_amd64.pyd dependency of c:\python\lib\site-packages\zmq\backend\cython\_poll.cp37-win_amd64.pyd
372215 WARNING: lib not found: libzmq.cp37-win_amd64.pyd dependency of c:\python\lib\site-packages\zmq\backend\cython\message.cp37-win_amd64.pyd
372230 WARNING: lib not found: libzmq.cp37-win_amd64.pyd dependency of c:\python\lib\site-packages\zmq\backend\cython\context.cp37-win_amd64.pyd
376910 INFO: Looking for eggs
376910 INFO: Using Python library c:\python\python37.dll
376910 INFO: Found binding redirects: 
[]
377533 INFO: Warnings written to C:\Users\Vimal\AppData\Local\Temp\tmpm_i752tq\build\sample\warn-sample.txt
378815 INFO: Graph cross-reference written to C:\Users\Vimal\AppData\Local\Temp\tmpm_i752tq\build\sample\xref-sample.html
379682 INFO: checking PYZ
379682 INFO: Building PYZ because PYZ-00.toc is non existent
379683 INFO: Building PYZ (ZlibArchive) C:\Users\Vimal\AppData\Local\Temp\tmpm_i752tq\build\sample\PYZ-00.pyz
389567 INFO: Building PYZ (ZlibArchive) C:\Users\Vimal\AppData\Local\Temp\tmpm_i752tq\build\sample\PYZ-00.pyz completed successfully.
389771 INFO: checking PKG
389771 INFO: Building PKG because PKG-00.toc is non existent
389772 INFO: Building PKG (CArchive) PKG-00.pkg
390259 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
390276 INFO: Bootloader c:\python\lib\site-packages\PyInstaller\bootloader\Windows-64bit\run.exe
390277 INFO: checking EXE
390277 INFO: Building EXE because EXE-00.toc is non existent
390277 INFO: Building EXE from EXE-00.toc
390279 INFO: Appending archive to EXE C:\Users\Vimal\AppData\Local\Temp\tmpm_i752tq\build\sample\sample.exe
390784 INFO: Building EXE from EXE-00.toc completed successfully.
390827 INFO: checking COLLECT
390828 INFO: Building COLLECT because COLLECT-00.toc is non existent
390828 INFO: Building COLLECT COLLECT-00.toc
598563 INFO: Building COLLECT COLLECT-00.toc completed successfully.
Moving project to: C:\Users\Vimal\Workspace\Python\WrapUp
Complete.
<!-- gh-comment-id:534381947 --> @dvimal27 commented on GitHub (Sep 24, 2019): I get the same result. Here is the error message, when I run the .exe file ``` WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions. c:\python\lib\site-packages\PyInstaller\loader\pyimod03_importers.py:621: MatplotlibDeprecationWarning: The MATPLOTLIBDATA environment variable was deprecated in Matplotlib 3.1 and will be removed in 3.3. exec(bytecode, module.__dict__) Traceback (most recent call last): File "sample.py", line 44, in <module> File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 677, in _load_unlocked File "c:\python\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 621, in exec_module exec(bytecode, module.__dict__) File "site-packages\pymc3\__init__.py", line 11, in <module> File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 677, in _load_unlocked File "c:\python\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 621, in exec_module exec(bytecode, module.__dict__) File "site-packages\pymc3\stats.py", line 20, in <module> File "site-packages\pkg_resources\__init__.py", line 481, in get_distribution File "site-packages\pkg_resources\__init__.py", line 357, in get_provider File "site-packages\pkg_resources\__init__.py", line 900, in require File "site-packages\pkg_resources\__init__.py", line 786, in resolve pkg_resources.DistributionNotFound: The 'scipy' distribution was not found and is required by the application [1888] Failed to execute script sample ``` Here is the Output from Pyinstaller UI, ``` Running auto-py-to-exe v2.6.5 Building in the current instances temporary directory at C:\Users\Vimal\AppData\Local\Temp\tmpm_i752tq To get a new temporary directory, restart this application Recursion Limit is set to 5000 Executing: pyinstaller -y --hidden-import scipy "C:/Users/Vimal/Workspace/Python/WrapUp/sample.py" 54363 INFO: PyInstaller: 4.0.dev0+8196c57ab 54363 INFO: Python: 3.7.4 54365 INFO: Platform: Windows-10-10.0.17763-SP0 54374 INFO: wrote C:\Users\Vimal\AppData\Local\Temp\tmpm_i752tq\sample.spec 54379 INFO: UPX is not available. 54381 INFO: Extending PYTHONPATH with paths ['C:\\Users\\Vimal\\Workspace\\Python\\WrapUp', 'C:\\Users\\Vimal\\AppData\\Local\\Temp\\tmpm_i752tq'] 54381 INFO: checking Analysis 54381 INFO: Building Analysis because Analysis-00.toc is non existent 54381 INFO: Initializing module dependency graph... 54391 INFO: Caching module graph hooks... 54407 INFO: Analyzing base_library.zip ... 64320 INFO: Caching module dependency graph... 64559 INFO: running Analysis Analysis-00.toc 64609 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable required by c:\python\python.exe 65304 INFO: Analyzing C:\Users\Vimal\Workspace\Python\WrapUp\sample.py 67366 INFO: Processing pre-find module path hook distutils 67369 INFO: distutils: retargeting to non-venv dir 'c:\\python\\lib' 72324 INFO: Processing pre-find module path hook site 72329 INFO: site: retargeting to fake-dir 'c:\\python\\lib\\site-packages\\PyInstaller\\fake-modules' 91794 INFO: Processing pre-safe import module hook setuptools.extern.six.moves 102880 INFO: Processing pre-safe import module hook six.moves 137475 INFO: Processing pre-safe import module hook urllib3.packages.six.moves 216838 INFO: Processing module hooks... 216838 INFO: Loading module hook "hook-certifi.py"... 217811 INFO: Loading module hook "hook-distutils.py"... 217819 INFO: Loading module hook "hook-django.core.cache.py"... 218240 INFO: Loading module hook "hook-django.core.mail.py"... 218370 INFO: Loading module hook "hook-django.core.management.py"... 218427 INFO: Excluding import 'IPython' 218437 INFO: Excluding import 'matplotlib' 218444 INFO: Excluding import 'tkinter' 218453 INFO: Loading module hook "hook-django.db.backends.py"... 221975 WARNING: Hidden import "django.db.backends.__pycache__.base" not found! 221975 INFO: Loading module hook "hook-django.py"... 234358 INFO: Determining a mapping of distributions to packages... 268202 INFO: Packages required by django: ['pytz', 'sqlparse'] 268206 WARNING: No django root directory could be found! 288371 INFO: Loading module hook "hook-encodings.py"... 288633 INFO: Loading module hook "hook-gevent.py"... 290599 WARNING: Unable to find package for requirement greenlet from package gevent. 290599 INFO: Packages required by gevent: ['cffi'] 298265 INFO: Loading module hook "hook-h5py.py"... 298268 INFO: Loading module hook "hook-IPython.py"... 298363 INFO: Excluding import 'PyQt4' 298379 INFO: Removing import of PyQt4 from module IPython.external.qt_loaders 298380 INFO: Excluding import 'gtk' 298394 INFO: Excluding import 'PyQt5' 298404 INFO: Removing import of PyQt5.QtCore from module IPython.external.qt_loaders 298407 INFO: Removing import of PyQt5.QtSvg from module IPython.external.qt_loaders 298409 INFO: Removing import of PyQt5.QtGui from module IPython.external.qt_loaders 298409 INFO: Removing import of PyQt5.QtWidgets from module IPython.external.qt_loaders 298410 INFO: Removing import of PyQt5 from module IPython.external.qt_loaders 298412 INFO: Excluding import 'PySide' 298434 INFO: Removing import of PySide from module IPython.external.qt_loaders 298436 INFO: Excluding import 'matplotlib' 298447 INFO: Removing import of matplotlib from module IPython.core.pylabtools 298447 INFO: Removing import of matplotlib._pylab_helpers from module IPython.core.pylabtools 298452 INFO: Removing import of matplotlib.figure from module IPython.core.pylabtools 298452 INFO: Removing import of matplotlib.pyplot from module IPython.core.pylabtools 298454 INFO: Excluding import 'tkinter' 298467 INFO: Removing import of tkinter from module IPython.lib.clipboard 298469 INFO: Loading module hook "hook-jedi.py"... 298880 INFO: Loading module hook "hook-jinja2.py"... 298945 INFO: Loading module hook "hook-jsonschema.py"... 298958 INFO: Loading module hook "hook-lib2to3.py"... 298982 INFO: Loading module hook "hook-matplotlib.backends.py"... 302861 INFO: Matplotlib backend "GTK3Agg": ignored cairo backend requires that pycairo>=1.11.0 or cairocffiis installed 303678 INFO: Matplotlib backend "GTK3Cairo": ignored cairo backend requires that pycairo>=1.11.0 or cairocffiis installed 304980 INFO: Matplotlib backend "MacOSX": ignored cannot import name '_macosx' from 'matplotlib.backends' (c:\python\lib\site-packages\matplotlib\backends\__init__.py) 308527 INFO: Matplotlib backend "nbAgg": added 310463 INFO: Matplotlib backend "Qt4Agg": added 311626 INFO: Matplotlib backend "Qt4Cairo": ignored cairo backend requires that pycairo>=1.11.0 or cairocffiis installed 312642 INFO: Matplotlib backend "Qt5Agg": added 313478 INFO: Matplotlib backend "Qt5Cairo": ignored cairo backend requires that pycairo>=1.11.0 or cairocffiis installed 314742 INFO: Matplotlib backend "TkAgg": added 315847 INFO: Matplotlib backend "TkCairo": ignored cairo backend requires that pycairo>=1.11.0 or cairocffiis installed 317478 INFO: Matplotlib backend "WebAgg": added 318568 INFO: Matplotlib backend "WX": ignored No module named 'wx' 319339 INFO: Matplotlib backend "WXAgg": ignored No module named 'wx' 320141 INFO: Matplotlib backend "WXCairo": ignored No module named 'wx' 321020 INFO: Matplotlib backend "agg": added 321734 INFO: Matplotlib backend "cairo": ignored cairo backend requires that pycairo>=1.11.0 or cairocffiis installed 322824 INFO: Matplotlib backend "pdf": added 323852 INFO: Matplotlib backend "pgf": added 324616 INFO: Matplotlib backend "ps": added 325426 INFO: Matplotlib backend "svg": added 326406 INFO: Matplotlib backend "template": added 327523 INFO: Loading module hook "hook-matplotlib.py"... 328133 INFO: Loading module hook "hook-nbconvert.py"... 328191 INFO: Loading module hook "hook-nbformat.py"... 328215 INFO: Loading module hook "hook-netCDF4.py"... 328289 WARNING: Hidden import "netcdftime" not found! 328289 INFO: Loading module hook "hook-notebook.py"... 331318 INFO: Loading module hook "hook-numpy.core.py"... 331516 INFO: Loading module hook "hook-numpy.py"... 331519 INFO: Loading module hook "hook-openpyxl.py"... 331588 INFO: Loading module hook "hook-pandas.py"... 339707 INFO: Loading module hook "hook-patsy.py"... 339710 INFO: Loading module hook "hook-PIL.Image.py"... 341171 INFO: Loading module hook "hook-PIL.py"... 341182 INFO: Excluding import 'PyQt4' 341191 INFO: Removing import of PyQt4 from module PIL.ImageQt 341194 INFO: Import to be excluded not found: 'FixTk' 341195 INFO: Excluding import 'PySide' 341217 INFO: Removing import of PySide from module PIL.ImageQt 341220 INFO: Excluding import 'PyQt5' 341236 INFO: Removing import of PyQt5.QtCore from module PIL.ImageQt 341236 INFO: Removing import of PyQt5.QtGui from module PIL.ImageQt 341240 INFO: Excluding import 'tkinter' 341257 INFO: Removing import of tkinter from module PIL.ImageTk 341258 INFO: Loading module hook "hook-PIL.SpiderImagePlugin.py"... 341279 INFO: Import to be excluded not found: 'FixTk' 341280 INFO: Excluding import 'tkinter' 341291 INFO: Loading module hook "hook-pkg_resources.py"... 342764 INFO: Processing pre-safe import module hook win32com 342900 INFO: Processing pre-safe import module hook win32com 343168 INFO: Excluding import '__main__' 343185 INFO: Removing import of __main__ from module pkg_resources 343186 INFO: Loading module hook "hook-pycparser.py"... 343188 INFO: Loading module hook "hook-pydoc.py"... 343190 INFO: Loading module hook "hook-pygments.py"... 351296 INFO: Loading module hook "hook-PyQt5.py"... 352885 INFO: Loading module hook "hook-PyQt5.QtCore.py"... 353125 INFO: Loading module hook "hook-PyQt5.QtGui.py"... 353431 INFO: Loading module hook "hook-PyQt5.QtSvg.py"... 354461 INFO: Loading module hook "hook-PyQt5.QtWidgets.py"... 355129 INFO: Loading module hook "hook-pytz.py"... 355257 INFO: Loading module hook "hook-scipy.io.matlab.py"... 355263 INFO: Loading module hook "hook-scipy.linalg.py"... 355266 INFO: Loading module hook "hook-scipy.py"... 355283 INFO: Loading module hook "hook-scipy.sparse.csgraph.py"... 355299 INFO: Loading module hook "hook-scipy.special._ellip_harm_2.py"... 355302 INFO: Loading module hook "hook-scipy.special._ufuncs.py"... 355304 INFO: Loading module hook "hook-setuptools.py"... 358147 INFO: Loading module hook "hook-shelve.py"... 358201 INFO: Loading module hook "hook-sqlite3.py"... 358423 INFO: Loading module hook "hook-sysconfig.py"... 358429 INFO: Loading module hook "hook-xml.dom.domreg.py"... 358431 INFO: Loading module hook "hook-xml.etree.cElementTree.py"... 358433 INFO: Loading module hook "hook-xml.py"... 358435 INFO: Loading module hook "hook-zmq.py"... 362198 INFO: Loading module hook "hook-_tkinter.py"... 362529 INFO: checking Tree 362529 INFO: Building Tree because Tree-00.toc is non existent 362530 INFO: Building Tree Tree-00.toc 362699 INFO: checking Tree 362699 INFO: Building Tree because Tree-01.toc is non existent 362700 INFO: Building Tree Tree-01.toc 362843 INFO: Loading module hook "hook-django.db.backends.mysql.base.py"... 362852 INFO: Loading module hook "hook-django.db.backends.oracle.base.py"... 363110 INFO: Looking for ctypes DLLs 363737 INFO: Analyzing run-time hooks ... 363804 INFO: Including run-time hook 'pyi_rth_pkgres.py' 363821 INFO: Including run-time hook 'pyi_rth_multiprocessing.py' 363848 INFO: Including run-time hook 'pyi_rth_traitlets.py' 363863 INFO: Including run-time hook 'pyi_rth__tkinter.py' 363881 INFO: Including run-time hook 'pyi_rth_certifi.py' 363900 INFO: Including run-time hook 'pyi_rth_pyqt5.py' 363915 INFO: Including run-time hook 'pyi_rth_mplconfig.py' 363934 INFO: Including run-time hook 'pyi_rth_mpldata.py' 364081 INFO: Looking for dynamic libraries 372132 WARNING: lib not found: libzmq.cp37-win_amd64.pyd dependency of c:\python\lib\site-packages\zmq\backend\cython\_proxy_steerable.cp37-win_amd64.pyd 372141 WARNING: lib not found: libzmq.cp37-win_amd64.pyd dependency of c:\python\lib\site-packages\zmq\backend\cython\utils.cp37-win_amd64.pyd 372151 WARNING: lib not found: libzmq.cp37-win_amd64.pyd dependency of c:\python\lib\site-packages\zmq\backend\cython\socket.cp37-win_amd64.pyd 372173 WARNING: lib not found: libzmq.cp37-win_amd64.pyd dependency of c:\python\lib\site-packages\zmq\backend\cython\error.cp37-win_amd64.pyd 372186 WARNING: lib not found: libzmq.cp37-win_amd64.pyd dependency of c:\python\lib\site-packages\zmq\backend\cython\_version.cp37-win_amd64.pyd 372195 WARNING: lib not found: libzmq.cp37-win_amd64.pyd dependency of c:\python\lib\site-packages\zmq\backend\cython\_device.cp37-win_amd64.pyd 372207 WARNING: lib not found: libzmq.cp37-win_amd64.pyd dependency of c:\python\lib\site-packages\zmq\backend\cython\_poll.cp37-win_amd64.pyd 372215 WARNING: lib not found: libzmq.cp37-win_amd64.pyd dependency of c:\python\lib\site-packages\zmq\backend\cython\message.cp37-win_amd64.pyd 372230 WARNING: lib not found: libzmq.cp37-win_amd64.pyd dependency of c:\python\lib\site-packages\zmq\backend\cython\context.cp37-win_amd64.pyd 376910 INFO: Looking for eggs 376910 INFO: Using Python library c:\python\python37.dll 376910 INFO: Found binding redirects: [] 377533 INFO: Warnings written to C:\Users\Vimal\AppData\Local\Temp\tmpm_i752tq\build\sample\warn-sample.txt 378815 INFO: Graph cross-reference written to C:\Users\Vimal\AppData\Local\Temp\tmpm_i752tq\build\sample\xref-sample.html 379682 INFO: checking PYZ 379682 INFO: Building PYZ because PYZ-00.toc is non existent 379683 INFO: Building PYZ (ZlibArchive) C:\Users\Vimal\AppData\Local\Temp\tmpm_i752tq\build\sample\PYZ-00.pyz 389567 INFO: Building PYZ (ZlibArchive) C:\Users\Vimal\AppData\Local\Temp\tmpm_i752tq\build\sample\PYZ-00.pyz completed successfully. 389771 INFO: checking PKG 389771 INFO: Building PKG because PKG-00.toc is non existent 389772 INFO: Building PKG (CArchive) PKG-00.pkg 390259 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully. 390276 INFO: Bootloader c:\python\lib\site-packages\PyInstaller\bootloader\Windows-64bit\run.exe 390277 INFO: checking EXE 390277 INFO: Building EXE because EXE-00.toc is non existent 390277 INFO: Building EXE from EXE-00.toc 390279 INFO: Appending archive to EXE C:\Users\Vimal\AppData\Local\Temp\tmpm_i752tq\build\sample\sample.exe 390784 INFO: Building EXE from EXE-00.toc completed successfully. 390827 INFO: checking COLLECT 390828 INFO: Building COLLECT because COLLECT-00.toc is non existent 390828 INFO: Building COLLECT COLLECT-00.toc 598563 INFO: Building COLLECT COLLECT-00.toc completed successfully. Moving project to: C:\Users\Vimal\Workspace\Python\WrapUp Complete. ```
Author
Owner

@brentvollebregt commented on GitHub (Sep 24, 2019):

Awesome, then the question I asked in my first reply is now answered: this is not an issue with auto-py-to-exe. This is on pyinstallers side.

If you wish, you can report this as an issue on pyinstallers GitHub repo.

<!-- gh-comment-id:534389953 --> @brentvollebregt commented on GitHub (Sep 24, 2019): Awesome, then the question I asked in my first reply is now answered: this is not an issue with auto-py-to-exe. This is on pyinstallers side. If you wish, you can report this as an issue on [pyinstallers GitHub repo](https://github.com/pyinstaller/pyinstaller).
Author
Owner

@dvimal27 commented on GitHub (Sep 24, 2019):

Okay. But, how do I resolve the issue? Any suggestions?

<!-- gh-comment-id:534397898 --> @dvimal27 commented on GitHub (Sep 24, 2019): Okay. But, how do I resolve the issue? Any suggestions?
Author
Owner

@brentvollebregt commented on GitHub (Sep 24, 2019):

Did you search for the error and do some research? Looks like pyinstaller/pyinstaller#1713 and this comment discuss similar issues with solutions.

<!-- gh-comment-id:534399883 --> @brentvollebregt commented on GitHub (Sep 24, 2019): Did you search for the error and do some research? Looks like pyinstaller/pyinstaller#1713 and [this comment](https://github.com/googleapis/google-cloud-python/issues/1187#issuecomment-254654658) discuss similar issues with solutions.
Author
Owner

@dvimal27 commented on GitHub (Sep 25, 2019):

Thank you.

Now, I could get rid of the import issues. But now there is some issue with compilation. Could you please help me in this regard?

Here is the error message from .exe

WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
c:\python\lib\site-packages\PyInstaller\loader\pyimod03_importers.py:621: MatplotlibDeprecationWarning:
The MATPLOTLIBDATA environment variable was deprecated in Matplotlib 3.1 and will be removed in 3.3.
  exec(bytecode, module.__dict__)

You can find the C code in this temporary file: C:\Users\Vimal\AppData\Local\Temp\theano_compilation_error_tyojr99y
Traceback (most recent call last):
  File "sample.py", line 66, in <module>
  File "sample.py", line 15, in coeffEstimation
  File "site-packages\pymc3\distributions\distribution.py", line 46, in __new__
  File "site-packages\pymc3\model.py", line 833, in Var
  File "site-packages\pymc3\model.py", line 1557, in __init__
  File "site-packages\pymc3\distributions\transforms.py", line 95, in apply
  File "site-packages\pymc3\distributions\distribution.py", line 56, in dist
  File "site-packages\pymc3\distributions\transforms.py", line 125, in __init__
  File "site-packages\pymc3\model.py", line 1274, in __init__
  File "site-packages\pymc3\distributions\continuous.py", line 224, in logp
  File "site-packages\theano\tensor\var.py", line 69, in __ge__
  File "site-packages\theano\gof\op.py", line 615, in __call__
  File "site-packages\theano\tensor\elemwise.py", line 482, in make_node
  File "site-packages\theano\tensor\elemwise.py", line 438, in get_output_info
  File "site-packages\theano\gof\op.py", line 670, in __call__
  File "site-packages\theano\gof\op.py", line 955, in make_thunk
  File "site-packages\theano\gof\op.py", line 858, in make_c_thunk
  File "site-packages\theano\gof\cc.py", line 1217, in make_thunk
  File "site-packages\theano\gof\cc.py", line 1157, in __compile__
  File "site-packages\theano\gof\cc.py", line 1624, in cthunk_factory
  File "site-packages\theano\gof\cmodule.py", line 1189, in module_from_key
  File "site-packages\theano\gof\cc.py", line 1527, in compile_cmodule
  File "site-packages\theano\gof\cmodule.py", line 2396, in compile_str
Exception: ('Compilation failed (return status=1): C:\\Users\\Vimal\\AppData\\Local\\Theano\\compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.4-64\\tmp_yb6bb2e\\mod.cpp:1:10: fatal error: Python.h: No such file or directory.  #include <Python.h>.           ^~~~~~~~~~. compilation terminated.\r. ', '[InplaceDimShuffle{x}(TensorConstant{0.0})]')
[1820] Failed to execute script sample
<!-- gh-comment-id:534888249 --> @dvimal27 commented on GitHub (Sep 25, 2019): Thank you. Now, I could get rid of the import issues. But now there is some issue with compilation. Could you please help me in this regard? Here is the error message from .exe ``` WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions. c:\python\lib\site-packages\PyInstaller\loader\pyimod03_importers.py:621: MatplotlibDeprecationWarning: The MATPLOTLIBDATA environment variable was deprecated in Matplotlib 3.1 and will be removed in 3.3. exec(bytecode, module.__dict__) You can find the C code in this temporary file: C:\Users\Vimal\AppData\Local\Temp\theano_compilation_error_tyojr99y Traceback (most recent call last): File "sample.py", line 66, in <module> File "sample.py", line 15, in coeffEstimation File "site-packages\pymc3\distributions\distribution.py", line 46, in __new__ File "site-packages\pymc3\model.py", line 833, in Var File "site-packages\pymc3\model.py", line 1557, in __init__ File "site-packages\pymc3\distributions\transforms.py", line 95, in apply File "site-packages\pymc3\distributions\distribution.py", line 56, in dist File "site-packages\pymc3\distributions\transforms.py", line 125, in __init__ File "site-packages\pymc3\model.py", line 1274, in __init__ File "site-packages\pymc3\distributions\continuous.py", line 224, in logp File "site-packages\theano\tensor\var.py", line 69, in __ge__ File "site-packages\theano\gof\op.py", line 615, in __call__ File "site-packages\theano\tensor\elemwise.py", line 482, in make_node File "site-packages\theano\tensor\elemwise.py", line 438, in get_output_info File "site-packages\theano\gof\op.py", line 670, in __call__ File "site-packages\theano\gof\op.py", line 955, in make_thunk File "site-packages\theano\gof\op.py", line 858, in make_c_thunk File "site-packages\theano\gof\cc.py", line 1217, in make_thunk File "site-packages\theano\gof\cc.py", line 1157, in __compile__ File "site-packages\theano\gof\cc.py", line 1624, in cthunk_factory File "site-packages\theano\gof\cmodule.py", line 1189, in module_from_key File "site-packages\theano\gof\cc.py", line 1527, in compile_cmodule File "site-packages\theano\gof\cmodule.py", line 2396, in compile_str Exception: ('Compilation failed (return status=1): C:\\Users\\Vimal\\AppData\\Local\\Theano\\compiledir_Windows-10-10.0.17763-SP0-Intel64_Family_6_Model_142_Stepping_10_GenuineIntel-3.7.4-64\\tmp_yb6bb2e\\mod.cpp:1:10: fatal error: Python.h: No such file or directory. #include <Python.h>. ^~~~~~~~~~. compilation terminated.\r. ', '[InplaceDimShuffle{x}(TensorConstant{0.0})]') [1820] Failed to execute script sample ```
Author
Owner

@brentvollebregt commented on GitHub (Sep 26, 2019):

Please see pyinstaller/pyinstaller#2512 and the related pyinstaller/pyinstaller#2114 issue. This is not an auto-py-to-exe issue and is not a pyinstaller either as described by htgoebel.

<!-- gh-comment-id:535326949 --> @brentvollebregt commented on GitHub (Sep 26, 2019): Please see pyinstaller/pyinstaller#2512 and the related pyinstaller/pyinstaller#2114 issue. This is not an `auto-py-to-exe` issue and is not a `pyinstaller` either as described by [htgoebel](https://github.com/pyinstaller/pyinstaller/issues/2114#issuecomment-234499256).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/auto-py-to-exe#69
No description provided.