diff options
author | Friedemann Kleint <[email protected]> | 2021-01-05 13:40:25 +0100 |
---|---|---|
committer | Friedemann Kleint <[email protected]> | 2021-01-05 15:46:10 +0100 |
commit | 05db21e661c6ba9eb69516cb1386bcbd431b7d2d (patch) | |
tree | 60d07747158ff9e6fdb8186fa822488320b4afc0 /examples/scriptableapplication | |
parent | 9547dc918868470fe00fafe25d74a87b2ed35f1f (diff) |
scriptable application/Unix: Remove setting of PYTHONHOME for virtualenv
On Linux, with 3.8, it causes an error in conjunction with virtualenv:
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'
Pick-to: 6.0
Pick-to: 5.15
Task-number: PYSIDE-841
Change-Id: Ibf1caa1a797faab5dd8e4bfa6eb23296bb7945a5
Reviewed-by: Christian Tismer <[email protected]>
Diffstat (limited to 'examples/scriptableapplication')
-rw-r--r-- | examples/scriptableapplication/pythonutils.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/examples/scriptableapplication/pythonutils.cpp b/examples/scriptableapplication/pythonutils.cpp index c5e18f256..eef2fada7 100644 --- a/examples/scriptableapplication/pythonutils.cpp +++ b/examples/scriptableapplication/pythonutils.cpp @@ -94,14 +94,12 @@ static const char virtualEnvVar[] = "VIRTUAL_ENV"; // packages location. static void initVirtualEnvironment() { - QByteArray virtualEnvPath = qgetenv(virtualEnvVar); // As of Python 3.8, Python is no longer able to run stand-alone in a // virtualenv due to missing libraries. Add the path to the modules instead. if (QOperatingSystemVersion::currentType() == QOperatingSystemVersion::Windows && (PY_MAJOR_VERSION > 3 || (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 8))) { + const QByteArray virtualEnvPath = qgetenv(virtualEnvVar); qputenv("PYTHONPATH", virtualEnvPath + "\\Lib\\site-packages"); - } else { - qputenv("PYTHONHOME", virtualEnvPath); } } |