# Python to .exe How to convert .py to .exe? Step by step guide.

Eshleron Updated on ・3 min read

# Auto PY to EXE

The only tool that we are gonna be using is Auto PY to EXE!

Auto PY to EXE is an amazing application for making .exe file out of your project whether it is one .py file or any number of them.
The application has a nice gui and looks like this:

## Step 1. Installation

Installing using PyPI:

To install the application run this line in cmd:

pip install auto-py-to-exe

To open the application run this line in cmd:

auto-py-to-exe

Note: if you have problem installing this way or you want to install it from GitHub go to the main page or watch this instructional video by the developer of "Auto PY to EXE" himself.

## Step 2. Converting

There are few main options you need to choose:

2. Pick "One Directory" or "One File" option

## 1. Pick your .py file

If you have multiple files choose one that starts the program.

## 2.1. "One Directory" option

Pretty simple. When choosing "One Directory" option "Auto PY to EXE" will put all dependencies in one folder. You can choose Output directory in "Advanced" menu. If you have media files like icons and backgrounds you should't have any problems using them inside your .exe if you place media files/folders in Output directory.
Something like this:

## 2.2. "One File" option

When choosing "One File" option "Auto PY to EXE" will create one .exe file containing all dependencies but NOT MEDIA FILES. If your program has only default Windows gui with no icons, backgrounds, media files or you are OK with placing media folder with .exe file feel free to skip the following explanation. For those who want to pack media files into .exe file itself read paragraph 3.

There is a menu in "Auto PY to EXE" called "Additional Files" that lets you add files of your choice. There is a catch though. "Auto PY to EXE" uses pyinstaller which unpacks the data into a temporary folder, and stores this directory path in the _MEIPASS environment variable. Your project won't find necessary files because the path changed and it won't see the new path eather. In other words, if option "One File" is choosen picked files in the "Additional Files" menu will not be added to .exe file. To work around this you should use this code provided by developer of Auto PY to EXE here

def resource_path(relative_path):
""" Get absolute path to resource, works for dev and for PyInstaller """
try:
# PyInstaller creates a temp folder and stores path in _MEIPASS
base_path = sys._MEIPASS
except Exception:
base_path = os.path.abspath(".")

return os.path.join(base_path, relative_path)


To use this code in your project replace the link to the media file you have now
For example:

setWindowIcon(QIcon('media\icons\logo.png'))


with

setWindowIcon(QIcon(resource_path('logo.png'))


Now the link will be referenced correctly and chosen files successfully packed into .exe file.

For comparison:

"C:\Users\User\PycharmProjects\media\icons\logo.png"


"C:\Users\User\AppData\Local\Temp\\_MEI34121\logo.png"


Press CONVERT .PY TO .EXE

Wait

## Step 3. Run your program!

Now everything is done!

Run it. Test it. See whats up.

Make sure everything works well.

Every file you need should be in the single directory.

This way you should have single .exe file. If you had a need and if done correctly your .exe file will be packed with all media inside it. You will not need any media files/folders present with .exe file for it to display them properly.

### P.S.

If you have any feedback or suggestions on what important information should be added feel free to let me know!
This guide is not a description of every possible option done every possible way.
I hope you found that information useful!

Posted on by:

### Eshleron

Everything you read on the internet is true - Abraham Lincoln.

### Discussion

mv somefile.py somefile.exe

😛

😛

Hey buddy, thanks for creating this. I have a problem though: in my python script I call several files that are in the current working directory, based on relative paths to simplify it. Once it's compiled to the exe, it seems that the program goes to the root folder of the computer as an absolute route. This kind of defeats the object since my program has to run in a folder with other files being added and removed.

What can I do to force the .exe to work on relative paths exactly the same way I have my script?

thanks

Hi!
1.What I usually do is get an absolute path so the script\scripts always know where they are

import os
dir = os.path.dirname(__file__)
abs_path = os.path.join(dir, DB_DOCS_NAME)
variable = open(abs_path)


2.If the main script is looking in the wrong place for other scripts then probably your imports are not correct.
Try to use this resource
realpython.com/absolute-vs-relativ...

Hope that I helped in some way

Great post!

I load variables from a config.py file. How would I enable users to modify this file OUTSIDE the .exe?

Hi!
Don't pack it into .exe file. Leave it outside .exe. It should work that way.

How can I leave the config.py file outside? I feel that PyInstaller loads the config.py file, compiles it into the exe and then has this fixed state in the program. I need to be able to modify the config file, after compiling.

How do I instruct PyInstaller to leave the config.py file separate?

You are right about fixed state. What PyInstaller remembers is the name of the file. So if you paste the same file with different content(some .txt maybe) it will work with it just fine because it thinks it is the same file.

That would be amazing and a super easy solve. Problem: I cannot find the config.py in the folder that was created by PyInstaller. Actually I can't find any of the modules I import. Are they merged into the .exe file?

You should add files manually sometimes. Try copying config there. It should work.

It does not work. When I manually add the config.py, the file is added - yes. But when I change variables in the file, nothing changes in the program. The .exe does not load data from the config.py

Make sure you added the fie to Auto PY to EXE additional files menu for it to be compilated with .exe.

I changed my config file to .json and now it works. Even with adding the file manually, it does NOT work when the file is .py (the file was in the folder, but changing settings did not reflect in the script).

Hi there! Thanks a lot for this beautiful article.
But when I try to run auto-py-to-exe I am getting this error:

Traceback (most recent call last):
File "C:\Users\Muhammad Hashim\AppData\Local\Programs\Python\Python38\Scripts\auto-py-to-exe-script.py", line 6, in
File "C:\Users\Muhammad Hashim\AppData\Local\Programs\Python\Python38\lib\site-packages\pkg_resources_init.py", line 3251, in
def _initialize_master_working_set():
.py", line 3234, in _call_aside
f(*args, **kwargs)
.py", line 3263, in _initialize_master_working_set
working_set = WorkingSet._build_master()
.py", line 583, in _build_master
ws.require(
requires)
.py", line 900, in require
needed = self.resolve(parse_requirements(requirements))
_.py", line 786, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'Eel==0.11.0' distribution was not found and is required by auto-py-to-exe

Hi!
It says you need Eel 0.11.0. Try to install/reinstall Eel and launch auto-py-to-exe again.

Thanks a lot !!!

I'm a VERY inexperienced python user, but have built a couple of very basic scripts with an small interactive UI (using Tkinter/pyodbc).

My question is - once the script is converted to .exe and distributed to the users (who will save and launch from the desktops), do they need to have anything else installed, or is the .exe truly fully self contained?

My goal is to be able to write a script, convert to an executable, send to my users, and have them use that for some basic daily work.

Thanks!

Hi! To use .exe an end user doesn't need anything. Once it's .exe and not .py format your script should be usable without any additional software. Check for correct paths if you're opening smt inside your program.

But make sure (if you work with SQL DB) that it's packed with evething it needs. I haven't tried to work with DB and PyInstaller so I dont know how it will be able to pack it. I guess to PyInstaller it's just the same library as any other.

It seems that that's not always the case, and the converted .exe doesn't always contain the same stuff.

For example, and I apologize for not having the code and error messages anymore... I had a script (in PyCharm) that pulled a 2 values from a SQL table, then just subtracted them and printed out the difference (up to the thenth position). It worked fine, but once I converted it, I received an error that the "Decimal" module/library could not be found. I never called "Decimal", but one of my colleagues said it was part of the standard python installation. So we assumed the issue, then, was that the "Decimal" library/module/package was excluded from the final build.

I've since been unable to resolve this problem and built the app using something else, but I'd love to try again sometime.

Hello,
I wrote an automation PY script. The script is working fine when tested on my IDE.

I created .exe file through your guide.
I lunched the application it opened fine. Everything was complete.

The problem is that when I tried to run automation it will open the web browser but will not automate anything.

Is they a way you can help me out

Hi!

Send me an error code if sometime there will be one.
List all libs you use. I think one of them works that way.
And try to launch your app from cmd, see if there is anything there.

I have fixed it using Auto py to exe.
I had to add some codes and move some files. It works now. But when I install it I can't find the software lunch icon on Desktop . Had to always go to my folder to lunch it. Is they a way to have it on my Desktop

I dont remember this option being there. I think by default it saves the result near initial script location.

I love the idea of the program - thanks!
Everything seemed to go great - testing with just one file - moved it to my Windows 10 PC, and got the error message shown in the screen grab.
I hope this is fixable and that there's something simple I didn't do!

The image didn't seem to want to load. Here's what it said ...

"The program or feature cannot start due to incompatibnility
to ask if a 64-bit Windows compatible version is available."

Hi!
Probably you used Python x32 or some library that is x32. Check for that, then recompile.

Excellent - thanks for the suggestion - I'll get to work!
cheers, Rick

GUI Wrapper for PyInstaller! Gonna try

This looks great! I do want to give a quick shout-out to Nim

If you're looking to build performant executables and Python is what you're really comfortable, I think you'll find Nim's syntax pleasingly similar; and the performance improvements are real 😀

hey when I add the dll files using add files drop down and create the exe , when i try to open the exe it says "failed to compile the exe file_name" , can you please help out with this it urgent as well Thank you so much in advance

Hi! Can you please send some screenshots?

Hi! I managed to convert the file but I'm facing some issues. These buttons will directly link to google chrome and display plotly graphs. However, the modules are not included. For example "No module named 'plotly'"

What can I do to make it work?

Thank you so much!

Hi!
Try to include them using Auto py to exe. I think in advanced you can include libs that you need.
If that doesn't work then copy them inside the converted folder.

I can't install it :
Command ""c:\program files (x86)\python37-32\python.exe" -u -c "import setuptools, tokenize;file='C:\Users\NATHAN~1\AppData\Local\Temp\pip-install-d_n5yima\future\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\NATHAN~1\AppData\Local\Temp\pip-record-oaye_ir1\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\NATHAN~1\AppData\Local\Temp\pip-install-d_n5yima\future\
You are using pip version 18.1, however version 19.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

I've try to upgrade pip but i can't uninstall my last version

It's not pip version problem I think. I would reinstall pip or python(if nothing helps) if googling doesn't help. Couple months passed since you asked, probably you already have a solution.

Hi,
I'ma first time use and can't get the program to work (I know I'm missing something) - can you help?

Output from the command prompt:

Mulhall@Mulhall-PC MINGW64 /e/python/projects/weighted-kappa/newexe (master)
\$ auto-py-to-exe
Traceback (most recent call last):
File "", line 41, in
File "", line 36, in walk_packages
File "", line 36, in walk_packages
File "", line 20, in walk_packages
from django.contrib.gis.gdal import GDALException
File "c:\users\mulhall\appdata\local\programs\python\python38-32\lib\site-packages\django\contrib\gis\gdal__init
_.py", line 28, in
from django.contrib.gis.gdal.datasource import DataSource
File "c:\users\mulhall\appdata\local\programs\python\python38-32\lib\site-packages\django\contrib\gis\gdal\datasource.py", line 39, in
from django.contrib.gis.gdal.driver import Driver
File "c:\users\mulhall\appdata\local\programs\python\python38-32\lib\site-packages\django\contrib\gis\gdal\driver.py", line 5, in
from django.contrib.gis.gdal.prototypes import ds as vcapi, raster as rcapi
File "c:\users\mulhall\appdata\local\programs\python\python38-32\lib\site-packages\django\contrib\gis\gdal\prototypes\ds.py", line 9, in
from django.contrib.gis.gdal.libgdal import GDAL_VERSION, lgdal
File "c:\users\mulhall\appdata\local\programs\python\python38-32\lib\site-packages\django\contrib\gis\gdal\libgdal.py", line 39, in
raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: Could not find the GDAL library (tried "gdal204", "gdal203", "gdal202", "gdal201", "gdal20"). Is GDAL installed? If it is, try setting GDAL_LIBRARY_PATH in your settings.
Traceback (most recent call last):
File "c:\users\mulhall\appdata\local\programs\python\python38-32\lib\site-packages\gevent_ffi\loop.py", line 268, in python_check_callback
def python_check_callback(self, watcher_ptr): # pylint:disable=unused-argument
KeyboardInterrupt
2020-05-10T16:08:25Z

Many thanks

Peter

Hi!

I'm not sure what the problem is. Try to reinstall GDAL as error message says or Django itself.

Hey there, i've been running into an error since last week. I tried to create a executable from a python file and everything worked fine except the fact that i had a console open when the exe was running. So i decided to use the --noconsole command in order to hide it and then the exe won't start . I got the error "failed to execute script". Coud anyone help me out?
Thanks you very much.

Hi!
If youneed to hide the console you can choose the option in Auto py to exe to hide it.

Wow did not know this app was out there. Thank you for your hard work. I have been trying to use pyinstaller to distrinute my tkinter app with SQLite DB... The error I get using pyinstaller is the same one I get using your tool. And that is when I try and use data from the DB or try to update the DB I get the following error:

sqlite3.OperationalError: no such table: track2

Any ideas?
Again thank you!

Hi!
Try this solution on stackoverflow

Check out this method to making sure that you are working in the right directory.
one way to do it

Let me know if that helps or not!

Hi, nice post!! It works perfectly. Im compiling the aplication in a 64 (x86) bits system, i wanna know if there is any way to make the programm works in a 32 bits system. Or i have to compile it in a 32 bit system?

Hi!
I think 64/32 bit depends on the libraries you choose to include.
For example, you only have 1 lib in your project.
If you install Python 32bit and PyQt 32bit, compile it, then it should work with 32 bit system.

hey, I got this error

ERROR: Command errored out with exit status 1:
command: 'c:\users\mansi sharma\appdata\local\programs\python\python38-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Mansi Sharma\AppData\Local\Temp\pip-install-1xntxbrx\gevent\setup.py'"'"'; file='"'"'C:\Users\Mansi Sharma\AppData\Local\Temp\pip-install-1xntxbrx\gevent\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Mansi Sharma\AppData\Local\Temp\pip-install-1xntxbrx\gevent\pip-egg-info'
cwd: C:\Users\Mansi Sharma\AppData\Local\Temp\pip-install-1xntxbrx\gevent\
Complete output (113 lines):
Traceback (most recent call last):
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 489, in _find_latest_available_vc_ver
return self.find_available_vc_vers()[-1]
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
yield saved
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "C:\Users\MANSIS~1\AppData\Local\Temp\easy_install-brfbx698\cffi-1.14.0\setup.py", line 127, in <module>
HUB_PRIMITIVES = Extension(name="gevent.__hub_primitives",
File "C:\Users\MANSIS~1\AppData\Local\Temp\easy_install-brfbx698\cffi-1.14.0\setup.py", line 105, in uses_msvc
include_dirs=include_dirs)
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\distutils\command\config.py", line 225, in try_compile
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\distutils\command\config.py", line 132, in _compile
self.compiler.compile([src], include_dirs=include_dirs)
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\distutils\_msvccompiler.py", line 360, in compile
self.initialize()
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\distutils\_msvccompiler.py", line 253, in initialize
vc_env = _get_vc_env(plat_spec)
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 185, in msvc14_get_vc_env
return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 843, in __init__
self.si = SystemInfo(self.ri, vc_ver)
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 485, in __init__
self.vc_ver = vc_ver or self._find_latest_available_vc_ver()
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 492, in _find_latest_available_vc_ver
raise distutils.errors.DistutilsPlatformError(err)
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Mansi Sharma\AppData\Local\Temp\pip-install-1xntxbrx\gevent\setup.py", line 427, in <module>
run_setup(EXT_MODULES, run_make=_BUILDING)
File "C:\Users\Mansi Sharma\AppData\Local\Temp\pip-install-1xntxbrx\gevent\setup.py", line 328, in run_setup
setup(
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\__init__.py", line 144, in setup
_install_setup_requires(attrs)
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\__init__.py", line 139, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\dist.py", line 716, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\pkg_resources\__init__.py", line 780, in resolve
dist = best[req.key] = env.best_match(
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\pkg_resources\__init__.py", line 1065, in best_match
return self.obtain(req, installer)
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\pkg_resources\__init__.py", line 1077, in obtain
return installer(requirement)
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\dist.py", line 786, in fetch_build_egg
return cmd.easy_install(req)
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 679, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 705, in install_item
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 890, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 1158, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 1144, in run_setup
run_setup(setup_script, args)
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 253, in run_setup
raise
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 166, in save_modules
saved_exc.resume()
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 141, in resume
six.reraise(type, exc, self._tb)
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\_vendor\six.py", line 685, in reraise
raise value.with_traceback(tb)
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
yield saved
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "C:\Users\MANSIS~1\AppData\Local\Temp\easy_install-brfbx698\cffi-1.14.0\setup.py", line 127, in <module>
HUB_PRIMITIVES = Extension(name="gevent.__hub_primitives",
File "C:\Users\MANSIS~1\AppData\Local\Temp\easy_install-brfbx698\cffi-1.14.0\setup.py", line 105, in uses_msvc
include_dirs=include_dirs)
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\distutils\command\config.py", line 225, in try_compile
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\distutils\command\config.py", line 132, in _compile
self.compiler.compile([src], include_dirs=include_dirs)
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\distutils\_msvccompiler.py", line 360, in compile
self.initialize()
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\distutils\_msvccompiler.py", line 253, in initialize
vc_env = _get_vc_env(plat_spec)
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 185, in msvc14_get_vc_env
return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 843, in __init__
self.si = SystemInfo(self.ri, vc_ver)
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 485, in __init__
self.vc_ver = vc_ver or self._find_latest_available_vc_ver()
File "c:\users\mansi sharma\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 492, in _find_latest_available_vc_ver
raise distutils.errors.DistutilsPlatformError(err)
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------
`

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Seems like "Microsoft Visual C++ 14.0 is required".

It's not good to do this. The performance will stay same (even decreased) and it will lose the cross-platform ability.

I think a common use case is sharing a Python program with someone who might not have the interpreter installed.

I am facing the below issue while converting py to exe. It if failing at Analysis due to log formatting syntax.

I am facing the below issue while converting py to exe. It if failing at Analysis due to log formatting syntax.

Hi!
1.If you still have the problem I would look and the string itself with
log.error(f""). Dont think that you can do what I think you are trying to do.

2.If second error is present after you delt with the first one, then simple recomendation is to reinstall pyinstaller. I had multiple problems with converting and they mostly got solved by restarting converting process.

Does this pack all the libraries that need to be imported in my python code in my .exe file ?

Yes, it does.

Nice!! How does this handle zipfile?

If I understood your quiestion correctly then that's what I found pythonhosted.org/PyInstaller/advan...

I created the exe file according to your guide but it doesn't automate web browser as it does on IDE. It only opens the web browser but does nothing.

my script have some packages: tensorflow, opencv, pandas, etc
Can I have to pre install on a non py computer, or just run this AUTO EXE and then execute it ? thanks alot!

You should be able to execute it without preinstallation if I understood your question correctly.

SystemExit: Unable to find "C:\Users\medo2\nltk_data" when adding binary and data files.

Project output will not be moved to output folder
Complete.

Does not work. It creates an .exe file, but when opened it displays this: ModuleNotFoundError: No module name 'matplotlib

Если библиотека не добавляется в упаковщик, попробуйте добавить ее вручную. Также попробуйте добавить библиотеку с помощью настроек в Auto PY to EXE.

Hi!
When I compile my tkinter program, I get no errors. However, when I try to run it, I get "Fatal Error Detected - Failed to run script myprogram". I've gotten it to work on a console based program but not this window based one (I am selecting "Window Based" in the setup).

Thanks!

Hi!

1. Usually recompiling helps.
2. If it doesn't help then let me see your error code/message, maybe smt will be in it that can help.
3. Try to check manually for your libraries in the project folder (paste them there if they are missing)