Problem with QTranslator (by GNU gettext user)

Florian Bruhin me at the-compiler.org
Sat Jun 17 19:26:33 BST 2023


Hey,

> access("/home/user/.local/lib/python3.9/site-packages/PyQt5/Qt5/translations/qt_de_DE.qm", R_OK) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)

So it looks like you have a PyQt install in
/home/user/.local/lib/python3.9/site-packages/PyQt5, probably installed
with "pip install --user" at some point.

You should probably uninstall it and use virtualenvs in the future.

> So I realized that the other Qt application that works fine is started
> via "python3 -Es" which results in the behavior that the python interpreter
> do not use the environment variables. Using my own test script with "-Es"
> and it is translated. Great!
> 
> But I can't find out which one of the environment variables do influence that behavior.
> I can not see "/home/user/.local/lib" in that output: [...]

The -E is irrelevant, it's most likely -s that makes the difference:

    -s     Don't add user site directory to sys.path.

Which means that you will end up with your "proper" system-wide
installed Qt rather than the one you installed via pip.

Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20230617/33618940/attachment.sig>


More information about the PyQt mailing list