[issue32573] All sys attributes (.argv, ...) should exist in embedded environments
Change by Dieter Weber : -- keywords: +patch pull_requests: +13153 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue32573> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35706] Make it easier to use a venv with an embedded Python interpreter
Change by Dieter Weber : -- title: Making an embedded Python interpreter use a venv is difficult -> Make it easier to use a venv with an embedded Python interpreter ___ Python tracker <https://bugs.python.org/issue35706> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35706] Making an embedded Python interpreter use a venv is difficult
Change by Dieter Weber : Removed file: https://bugs.python.org/file48039/Source.cpp ___ Python tracker <https://bugs.python.org/issue35706> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35706] Making an embedded Python interpreter use a venv is difficult
Change by Dieter Weber : Added file: https://bugs.python.org/file48040/Source.cpp ___ Python tracker <https://bugs.python.org/issue35706> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35706] Making an embedded Python interpreter use a venv is difficult
New submission from Dieter Weber : Python virtual environments are awesome! Using venvs with an embedded Python interpreter has proven difficult, unfortunately. With conda environments it works. See appended a sample file to reproduce the behavior. The core of the problem seems to be that a venv doesn't contain a full Python installation, and Py_Initialize() apparently doesn't support setting up the combination of venv directories and base installation correctly, i.e. setting sys.prefix and sys.base_prefix and potentially other values. Observed behavior when trying to use a venv: """ Initializing... Fatal Python error: Py_Initialize: unable to load the file system codec ModuleNotFoundError: No module named 'encodings' Current thread 0x1e90 (most recent call first): """ Expected behavior: Setting Py_SetPythonHome() to a venv works and sets up all paths and prefixes correctly to use the venv, just like it does for a conda environment. -- files: Source.cpp messages: 78 nosy: Dieter Weber priority: normal severity: normal status: open title: Making an embedded Python interpreter use a venv is difficult type: enhancement versions: Python 3.6 Added file: https://bugs.python.org/file48039/Source.cpp ___ Python tracker <https://bugs.python.org/issue35706> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com