View Issue Details

IDProjectCategoryView StatusLast Update
0017096ScribusOS-MacOSXpublic2024-03-21 07:19
Reporterale Assigned To 
Status newResolutionopen 
Product Version1.7.0.svn 
Summary0017096: include tkinter in the dmg
Descriptionit would be useful to include tkinter in the dmg files.

it's used by script distributed with scribus itself and is the most common way to create a UI in scribus scripts.

since it's included in most software distributed with / for python, i think that it should be documented how to do it.
TagsNo tags attached.


has duplicate 0017116 closedcbradney Bug im Kalender Widget 
related to 0017179 new Problem execution script officiel scribus 



2023-12-28 15:31

administrator   ~0050707

Ale, I think you experimented with Pyside and Qt for Python? I would much prefer we move to that.


2023-12-28 17:12

manager   ~0050708

i'd love to do so, and i will have a look at it again.

but you will then have to provide pyside6... which is probably harder than tkinter.

personally, i used to hate tk and have now mixed feelings about it:

- it's (almost) everywhere, where python is: that's handy.
- it's trivial to do simple things (but bigger things get hard/ugly rather fast)
- i used to have a real ugly look... it's somehow ok on my computer now.


2023-12-28 19:46

manager   ~0050710

i digged into it:

- debian (and ubuntu) do not have pyside6
- i've installed pyside6 in a venv and started scribus from inside of it.
- In the scripter console, pyside6 is correctly detected:
      import PySide6
- but showing a dialog fails at the import line:
      from PySide6.QtWidgets import QApplication, QWidget
      ImportError: /home/ale/src/scribus-pyside6/venv/lib/python3.11/site-packages/PySide6/ undefined symbol: _ZN9QMetaType14registerHelperEPKN9QtPrivate18QMetaTypeInterfaceE, version
- `python3` correctly shows the empty widget.
- it might be possible to find a way to get it to work but i wonder if it's worth the effort.

somehow, i'd prefer to build a new scripter with solid bases that are somehow the state of the art.

i went back to my pybind11-playground and added a new test folder for pyside6:

it does correctly work.

the next step would be to try to update

to use pyside6. but scrolling through the tickets in that repository, gives me some doubts about how easy it will be to get c++ and python to use the same objects.

the fact that pyside6 is not packaged for debian is not so nice... but there might be ways to get it to work.

and is still not solved... but i want to test it with pyside6... maybe qt did some magic and it does not happen anymore : - )


2023-12-28 20:26

manager   ~0050711

... the issue about importing twice qt into python might be solved with the latest pyside11 and the current pyside6...


2023-12-29 18:19

administrator   ~0050714

I'm including the entire python rebuit via .. so maybe Tk is included.. unsure


2023-12-30 16:13

manager   ~0050715

says that "The official Python binary release bundles Tcl/Tk 8.6 threaded. "

i cannot really say if the scripts in the repository you are using are pulling that official binary, but it's possible that it is.

This is the image:

i've managed to unpack it with 7rar and it does not look like it contains much more than pyhton itself (which i could not find) and pip.


2023-12-30 21:15

administrator   ~0050717

/Python.framework/Versions/3.11/lib include tcl8.8 and tk8.6 libs


2023-12-31 06:30

manager   ~0050718

and what happens when you run

python -m tkinter

as described in the python documentation linked above?

... i'm asking for a friend...


2023-12-31 10:14

administrator   ~0050720

I don't know how to set all the environment variables properly, however I managed to get it to start from within my dmg:

PYTHONPATH=/Volumes/Scribus/ python3 -m tkinter

DEPRECATION WARNING: The system version of Tk is deprecated and may be removed in a future release. Please don't rely on it. Set TK_SILENCE_DEPRECATION=1 to suppress this warning.
And I had a popup GUI based window with a Click Me and Quit button.


2023-12-31 10:56

manager   ~0050721

mmm strange

says that tcl/tk should be included.

are you sure that you're using python 3.11 from the folder?

i would launch it as /Volumes/Scribus/ (if python3 is in the 3.11/ folder)


2023-12-31 11:48

administrator   ~0050722

Hmm no, you're right, but calling it directly means it doesn't find the files from the Scribus installation. They are definitely there:
 ls /Volumes/Scribus/
auto.tcl encoding http1.0 msgs package.tcl safe.tcl tclIndex word.tcl
clock.tcl history.tcl init.tcl opt0.4 parray.tcl tclAppInit.c tm.tcl

It does not want to find that init.tcl though.

PYTHONPATH=/Volumes/Scribus/ PYTHONHOME=/Volumes/Scribus/ /Volumes/Scribus/ -m tkinter
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/Volumes/Scribus/", line 7, in <module>
  File "/Volumes/Scribus/", line 4618, in _test
    root = Tk()
  File "/Volumes/Scribus/", line 2326, in __init__ = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: Can't find a usable init.tcl in the following directories:
    /Library/Frameworks/Python.framework/Versions/3.11/lib/tcl8.6 /Volumes/Scribus/ /Volumes/Scribus/ /Volumes/Scribus/ /Volumes/Scribus/ /Volumes/Scribus/ /Volumes/Scribus/


2023-12-31 13:48

administrator   ~0050723

After fixing some rpaths, i now get this from scripter console:
import tkinter
['/Applications/', '/Applications/', '/Applications/', '/Applications/', '/Applications/']

So tkinter is now loading from console. :)

However, running tk based scripts from the Scribus menu still get errors like:

Traceback (most recent call last):
  File "<string>", line 11, in <module>
  File "<string>", line 1577, in <module>
  File "<string>", line 1562, in main_wrapper
  File "<string>", line 1551, in main
  File "<string>", line 1544, in initialisation
  File "<string>", line 1512, in setup_tk
  File "/Applications/", line 2326, in __init__ = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: Can't find a usable init.tcl in the following directories:
    /Library/Frameworks/Python.framework/Versions/3.11/lib/tcl8.6 /usr/lib/tcl8.6 /lib/tcl8.6 /usr/library /library /tcl8.6.13/library /tcl8.6.13/library

This probably means that Tcl wasn't installed properly.


2023-12-31 15:45

manager   ~0050724

i think that you are on a good path...

... i wonder if it wouldn't be worth to open a ticket on

and ask there if somebody has a clue about getting tk to work with that relocatable python.

Issue History

Date Modified Username Field Change
2023-12-28 09:17 ale New Issue
2023-12-28 15:31 cbradney Note Added: 0050707
2023-12-28 17:12 ale Note Added: 0050708
2023-12-28 19:46 ale Note Added: 0050710
2023-12-28 20:26 ale Note Added: 0050711
2023-12-29 18:19 cbradney Note Added: 0050714
2023-12-30 16:13 ale Note Added: 0050715
2023-12-30 21:15 cbradney Note Added: 0050717
2023-12-31 06:30 ale Note Added: 0050718
2023-12-31 10:14 cbradney Note Added: 0050720
2023-12-31 10:56 ale Note Added: 0050721
2023-12-31 11:48 cbradney Note Added: 0050722
2023-12-31 13:48 cbradney Note Added: 0050723
2023-12-31 15:45 ale Note Added: 0050724
2024-01-20 15:54 jghali Relationship added has duplicate 0017116
2024-03-21 07:19 ale Relationship added related to 0017179