Menu

Tkinter

Help
Kadner
2023-01-23
2023-01-24
  • Kadner

    Kadner - 2023-01-23

    Running Npp 8.2.1. 64b
    Installed Plugin PythonScript 1.5.4.0

    Problems trying to run supplied " ...\Scripts\Samples\sorter.py" script
    Fixed "from unidecode import unidecode" module not found error by copying extracted folder from package in " ...\lib " folder

    Now stuck with error showing in console:
    File "C:\Users\admin\AppData\Roaming\Notepad++\plugins\Config\PythonScript\scripts\Sorter.py", line 8, in <module>
    import Tkinter as tk
    File "C:\Program Files\Notepad++\plugins\PythonScript\lib\lib-tk\Tkinter.py", line 38, in <module>
    import FixTk
    File "C:\Program Files\Notepad++\plugins\PythonScript\lib\lib-tk\FixTk.py", line 68, in <module>
    import _tkinter
    ImportError: No module named _tkinter
    or
    ImportError: DLL load failed: The specified module could not be found.</module></module></module>

    tried:
    - copied ...\python27\lib\lib-tk folder
    - copied ...\python27\DLLs folder

    • Ticked "run from installed libraries ... " in configuration
    • Copied windows\system32\python27.dll (v2.7.18.) file in ...plugins\pythonscript folder
    • checked that Microsoft Visual C++ redistributable are installed

    no success from either approach .

    Yet, when running python interpreter, "import Tkinter" causes no error
    Note: "c:\python27\DLLs\ _tkinter.pyd" file exists

    Help someone!
    Are the installed native python modules not properly configured for PS?
    is the problem with the pyd file extension?
    Thanks

     

    Last edit: Kadner 2023-01-23
  • Sasumner

    Sasumner - 2023-01-24

    The first thing I would do would be to update to the latest 64-bit N++ and PythonScript 2.0.

     
    • Kadner

      Kadner - 2023-01-24

      At first sight, NPP 8.4.8 with PythonScript2.0 apparently did the trick! (One only needed to install the missing unidecode module).
      Thanks a lot for the (prompt) response.

      However on closer inspection the problem lied in a patched 'sys.path' in MY now OLD custom startup.py which resulted in missing python27\DLLs folder in the path... (this was meant to circumvent the error thrown by PythonScript when it imported pygtk module)

       

      Last edit: Kadner 2023-02-01

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.