0

I'm getting this error in command prompt when I try to covert my .py file into an exe:

[Errno 2] No such file or directory: 'C:\\Program Files\\Python35\\tcl\\tcl8.6'

Here's my setup.py file code:

from cx_Freeze import setup, Executable

import os
os.environ['TCL_LIBRARY'] = "C:\\Program Files\\Python35\\tcl\\tcl8.6"
os.environ['TK_LIBRARY'] = "C:\\Program Files\\Python35\\tcl\\tk8.6"

setup (name = 'CODAQ Beta', version = '0.1', description = 'Aerosol Data Visualization Environment', executables = [Executable("CODAQ.py")])

I've heard that may I have to change os.environ['TCL_LIBRARY'] and os.environ['TK_LIBRARY'] depending on the path of tcl8.6 and tk.86 in my system. Any tips on how to do this?

Andrew Louis
  • 303
  • 1
  • 2
  • 15

1 Answers1

2

Found the solution:

tcl was actually in Anaconda3:

here's the code I changed:

from cx_Freeze import setup, Executable

import os
os.environ['TCL_LIBRARY'] = "C:\\Program Files\\Anaconda3\\tcl\\tcl8.6"
os.environ['TK_LIBRARY'] = "C:\\Program Files\\Anaconda3\\tcl\\tk8.6"

setup (name = 'CODAQ Beta', version = '0.1', description = 'Aerosol Data Visualization Environment', executables = [Executable("CODAQ.py")])
Andrew Louis
  • 303
  • 1
  • 2
  • 15