Problems registering, no confirmation email - see http://wiki.scribus.net/canvas/Forums_Registration
Quote from: antoineb on February 05, 2026, 12:07:52 PMI would really appreciate either of the proposed solutions.Me too.
Quote from: antoineb on February 05, 2026, 12:07:52 PMInitially, this simple option would be fine. See this small mock-up.The image no longer exists (or the directory has been changed).
def load_venv(packages):
"""load_venv(packages) -> bool
Load the virtual environment in venv with the packages
packages -- A dict, the key being the name of the package and the value
a folder in site-packages to test if the package is indeed
installed.
It can be a list if the package name is identical to
the folder name.
"""
ACTIVATE_PATH = Path(__file__).resolve().parent
venv_path = ACTIVATE_PATH / 'venv'
if not venv_path.is_dir():
show_error(f'You need to create a virtual environment called venv in the script folder:\n\n{venv_path}.\n\nSee the README.md for more details.')
return False
# Find site-packages on Windows or Linux/Mac
site_packages = None
for pattern in ('Lib/site-packages', 'lib/python*/site-packages'):
matches = list(venv_path.glob(pattern))
if matches:
site_packages = matches[0]
break
if site_packages is None:
show_error("Could not find the site-packages in the virtual environment.")
return False
site.addsitedir(site_packages)
if type(packages) is list:
packages = dict(zip(packages, packages))
for package, folder in packages.items():
if not (site_packages / folder).is_dir():
show_error(f'You need to pip install {package} in your virtual environment\n\n{ACTIVATE_PATH}.\n\n See the README.md for more details.')
return False
return Truedef show_error(message):
scribus.messageBox('Scribus - Script Error', message, scribus.ICON_WARNING, scribus.BUTTON_OK)