Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

natlinkconfig_cli.exe and natlinkconfig_gui.exe break if tck/tk not installed by python installer. #25

Open
Voxellence opened this issue Oct 8, 2022 · 6 comments

Comments

@Voxellence
Copy link

Voxellence commented Oct 8, 2022

I've installed the latest pre-release of NatLink, 5.3.4, which I downloaded from the releases page.

When I run natlinkconfig_cli.exe I get the following:

Traceback (most recent call last):
  File "C:\Python\Python310-32\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Python\Python310-32\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Python\Python310-32\Scripts\natlinkconfig_cli.exe\__main__.py", line 4, in <module>
  File "C:\Python\Python310-32\lib\site-packages\natlinkcore\configure\natlinkconfig_cli.py", line 8, in <module>
    from natlinkcore.configure import natlinkconfigfunctions
  File "C:\Python\Python310-32\lib\site-packages\natlinkcore\configure\natlinkconfigfunctions.py", line 31, in <module>
    from natlinkcore import tkinter_dialogs
  File "C:\Python\Python310-32\lib\site-packages\natlinkcore\tkinter_dialogs.py", line 18, in <module>
    from tkinter import filedialog
ModuleNotFoundError: No module named 'tkinter'

When I run natlinkconfig_gui.exe, nothing happens.

@LexiconCode
Copy link
Member

LexiconCode commented Oct 8, 2022

tkinter is a standard python library. How was the python environment installed? We should add tk as a requirement to cover the edge case.

@Voxellence
Copy link
Author

Voxellence commented Oct 9, 2022

I uninstalled all versions of Python on my computer, even the ones installed by Visual Studio. I purged the registry of the three relevant nodes. Then I installed the 32-bit Python 3.10.7 executable located where this hyperlink points to.

I installed NatLink Core and NatLink in the order and from the sources you pointed me to.

Thanks.

@LexiconCode
Copy link
Member

LexiconCode commented Oct 9, 2022

Uninstall Python and try again using the natlink installer? Make sure to delete the python site packages directory

This time don't worry about installing natlink core. That's handled by the installer.

I just did a clean install with the latest release. Couldn't replicate the issue with the missing TK package. Paying attention to the python install the TK package was installed along with the Python environment.

@LexiconCode LexiconCode transferred this issue from dictation-toolbox/natlink Oct 9, 2022
@Voxellence
Copy link
Author

Voxellence commented Oct 10, 2022

Thanks, @LexiconCode. I was resisting the idea of letting NatLink install Python because I have my own preferred location. So after a quick Google I discovered that the installer wizard has a checkbox, "tcl/tk and IDLE", which is required to be checked in order to install tkinter. Therefore, I simply ran the installer again, chose Modify, and checked the checkbox. Bada boom, the configuration programs now work.

@dougransom
Copy link
Member

How do we prevent users from running into this?

@dougransom dougransom changed the title natlinkconfig_cli.exe and natlinkconfig_gui.exe natlinkconfig_cli.exe and natlinkconfig_gui.exe break if tck/tk not installed by python installer. Oct 18, 2022
@LexiconCode
Copy link
Member

LexiconCode commented Oct 19, 2022

How do we prevent users from running into this?

I don't know of any other methods except:

  • Reinstall Python
  • Modify an existing install through Python's installer.

Note:

  • To my knowledge Python TK is enabled by default on the average Python install.
  • When the Natlink installer installs Python TK is installed automatically.

When we have the install documentation we can make a note of this for users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants