PyScripter <pyscrip...@gmail.com> added the comment:

Just in case this will be of help to anyone, I found a way to use venvs in 
embedded python.

- You first need to Initialize python that is referred as home in pyvenv.cfg.
- Then you execute the following script:

import sys
sys.executable = r"Path to the python executable inside the venv"
path = sys.path
for i in range(len(path)-1, -1, -1):
    if path[i].find("site-packages") > 0:
        path.pop(i)
import site
site.main()
del sys, path, i, site

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue22213>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to