How do I fix an Error when Freezing Python 3.7 Script using cx_Freeze
I am trying to create a standalone executable with my python script using cx_Freeze.
This is the error I am getting: error: [Errno 2] No such file or directory: 'C:\Program Files\Python37\tcl\tcl8.6'
Does this have anything to do with using a module such as PySimpleGUI? I am using PySimpleGUI 3.1.2
.
How do I fix this?
Here is my code (setup.py and Track_Companion.py).
Note: Track_Companion.py is not yet finished.
python python-3.x cx-freeze python-3.7 pysimplegui
add a comment |
I am trying to create a standalone executable with my python script using cx_Freeze.
This is the error I am getting: error: [Errno 2] No such file or directory: 'C:\Program Files\Python37\tcl\tcl8.6'
Does this have anything to do with using a module such as PySimpleGUI? I am using PySimpleGUI 3.1.2
.
How do I fix this?
Here is my code (setup.py and Track_Companion.py).
Note: Track_Companion.py is not yet finished.
python python-3.x cx-freeze python-3.7 pysimplegui
The only way I've created an EXE using PySimpleGUI is by using PyInstaller as shown in the readme. Side note... I would upgrade your PySimpleGUI. It's at 3.14.0 now.
– MikeyB
Nov 13 '18 at 4:55
add a comment |
I am trying to create a standalone executable with my python script using cx_Freeze.
This is the error I am getting: error: [Errno 2] No such file or directory: 'C:\Program Files\Python37\tcl\tcl8.6'
Does this have anything to do with using a module such as PySimpleGUI? I am using PySimpleGUI 3.1.2
.
How do I fix this?
Here is my code (setup.py and Track_Companion.py).
Note: Track_Companion.py is not yet finished.
python python-3.x cx-freeze python-3.7 pysimplegui
I am trying to create a standalone executable with my python script using cx_Freeze.
This is the error I am getting: error: [Errno 2] No such file or directory: 'C:\Program Files\Python37\tcl\tcl8.6'
Does this have anything to do with using a module such as PySimpleGUI? I am using PySimpleGUI 3.1.2
.
How do I fix this?
Here is my code (setup.py and Track_Companion.py).
Note: Track_Companion.py is not yet finished.
python python-3.x cx-freeze python-3.7 pysimplegui
python python-3.x cx-freeze python-3.7 pysimplegui
asked Nov 13 '18 at 1:21
SomeoneSomeone
204
204
The only way I've created an EXE using PySimpleGUI is by using PyInstaller as shown in the readme. Side note... I would upgrade your PySimpleGUI. It's at 3.14.0 now.
– MikeyB
Nov 13 '18 at 4:55
add a comment |
The only way I've created an EXE using PySimpleGUI is by using PyInstaller as shown in the readme. Side note... I would upgrade your PySimpleGUI. It's at 3.14.0 now.
– MikeyB
Nov 13 '18 at 4:55
The only way I've created an EXE using PySimpleGUI is by using PyInstaller as shown in the readme. Side note... I would upgrade your PySimpleGUI. It's at 3.14.0 now.
– MikeyB
Nov 13 '18 at 4:55
The only way I've created an EXE using PySimpleGUI is by using PyInstaller as shown in the readme. Side note... I would upgrade your PySimpleGUI. It's at 3.14.0 now.
– MikeyB
Nov 13 '18 at 4:55
add a comment |
2 Answers
2
active
oldest
votes
Instructions for making .EXE files from programs using PySimpleGUI can be found in the docs here.
To create the .EXE:
pyinstaller -wF yoursourcefile.py
I would upgrade your PySimpleGUI package prior to doing it.
add a comment |
cx_Freeze
does not yet support Python 3.7, it has a bug. A bugfix exists but has not yet been released, however you can apply it manually, see What could be the reason for fatal python error:initfsencoding:unable to load the file system codec? and Cx_freeze crashing Python3.7.0. Or you can rollback to Python 3.6 if this is an option for you.- Have you checked that
C:\Program Files\Python37\tcl\tcl8.6
exists? It would anyway be better to let your setup script dynamically determine you Python installation directory usingPYTHON_INSTALL_DIR = os.path.dirname(os.path.dirname(os.__file__))
as done in this answer. - You need to tell
cx_Freeze
to include the Tcl and Tk DLLs using thebuild_exe
optioninclude_files
as done in the same answer; if you are usingcx_Freeze
5.1.1 or 5.1.0, you need to do it slightly differently, see this answer.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53272419%2fhow-do-i-fix-an-error-when-freezing-python-3-7-script-using-cx-freeze%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Instructions for making .EXE files from programs using PySimpleGUI can be found in the docs here.
To create the .EXE:
pyinstaller -wF yoursourcefile.py
I would upgrade your PySimpleGUI package prior to doing it.
add a comment |
Instructions for making .EXE files from programs using PySimpleGUI can be found in the docs here.
To create the .EXE:
pyinstaller -wF yoursourcefile.py
I would upgrade your PySimpleGUI package prior to doing it.
add a comment |
Instructions for making .EXE files from programs using PySimpleGUI can be found in the docs here.
To create the .EXE:
pyinstaller -wF yoursourcefile.py
I would upgrade your PySimpleGUI package prior to doing it.
Instructions for making .EXE files from programs using PySimpleGUI can be found in the docs here.
To create the .EXE:
pyinstaller -wF yoursourcefile.py
I would upgrade your PySimpleGUI package prior to doing it.
answered Nov 13 '18 at 4:58
MikeyBMikeyB
70359
70359
add a comment |
add a comment |
cx_Freeze
does not yet support Python 3.7, it has a bug. A bugfix exists but has not yet been released, however you can apply it manually, see What could be the reason for fatal python error:initfsencoding:unable to load the file system codec? and Cx_freeze crashing Python3.7.0. Or you can rollback to Python 3.6 if this is an option for you.- Have you checked that
C:\Program Files\Python37\tcl\tcl8.6
exists? It would anyway be better to let your setup script dynamically determine you Python installation directory usingPYTHON_INSTALL_DIR = os.path.dirname(os.path.dirname(os.__file__))
as done in this answer. - You need to tell
cx_Freeze
to include the Tcl and Tk DLLs using thebuild_exe
optioninclude_files
as done in the same answer; if you are usingcx_Freeze
5.1.1 or 5.1.0, you need to do it slightly differently, see this answer.
add a comment |
cx_Freeze
does not yet support Python 3.7, it has a bug. A bugfix exists but has not yet been released, however you can apply it manually, see What could be the reason for fatal python error:initfsencoding:unable to load the file system codec? and Cx_freeze crashing Python3.7.0. Or you can rollback to Python 3.6 if this is an option for you.- Have you checked that
C:\Program Files\Python37\tcl\tcl8.6
exists? It would anyway be better to let your setup script dynamically determine you Python installation directory usingPYTHON_INSTALL_DIR = os.path.dirname(os.path.dirname(os.__file__))
as done in this answer. - You need to tell
cx_Freeze
to include the Tcl and Tk DLLs using thebuild_exe
optioninclude_files
as done in the same answer; if you are usingcx_Freeze
5.1.1 or 5.1.0, you need to do it slightly differently, see this answer.
add a comment |
cx_Freeze
does not yet support Python 3.7, it has a bug. A bugfix exists but has not yet been released, however you can apply it manually, see What could be the reason for fatal python error:initfsencoding:unable to load the file system codec? and Cx_freeze crashing Python3.7.0. Or you can rollback to Python 3.6 if this is an option for you.- Have you checked that
C:\Program Files\Python37\tcl\tcl8.6
exists? It would anyway be better to let your setup script dynamically determine you Python installation directory usingPYTHON_INSTALL_DIR = os.path.dirname(os.path.dirname(os.__file__))
as done in this answer. - You need to tell
cx_Freeze
to include the Tcl and Tk DLLs using thebuild_exe
optioninclude_files
as done in the same answer; if you are usingcx_Freeze
5.1.1 or 5.1.0, you need to do it slightly differently, see this answer.
cx_Freeze
does not yet support Python 3.7, it has a bug. A bugfix exists but has not yet been released, however you can apply it manually, see What could be the reason for fatal python error:initfsencoding:unable to load the file system codec? and Cx_freeze crashing Python3.7.0. Or you can rollback to Python 3.6 if this is an option for you.- Have you checked that
C:\Program Files\Python37\tcl\tcl8.6
exists? It would anyway be better to let your setup script dynamically determine you Python installation directory usingPYTHON_INSTALL_DIR = os.path.dirname(os.path.dirname(os.__file__))
as done in this answer. - You need to tell
cx_Freeze
to include the Tcl and Tk DLLs using thebuild_exe
optioninclude_files
as done in the same answer; if you are usingcx_Freeze
5.1.1 or 5.1.0, you need to do it slightly differently, see this answer.
answered Nov 13 '18 at 8:15
jpegjpeg
5991318
5991318
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53272419%2fhow-do-i-fix-an-error-when-freezing-python-3-7-script-using-cx-freeze%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
The only way I've created an EXE using PySimpleGUI is by using PyInstaller as shown in the readme. Side note... I would upgrade your PySimpleGUI. It's at 3.14.0 now.
– MikeyB
Nov 13 '18 at 4:55