Author pyscripter
Recipients eric.snow, grahamd, inada.naoki, ncoghlan, pitrou, pyscripter, steve.dower, vstinner
Date 2019-10-17.22:00:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1571349600.3.0.915286547021.issue22213@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2019-10-17 22:00:00pyscriptersetrecipients: + pyscripter, ncoghlan, pitrou, vstinner, grahamd, inada.naoki, eric.snow, steve.dower
2019-10-17 22:00:00pyscriptersetmessageid: <1571349600.3.0.915286547021.issue22213@roundup.psfhosted.org>
2019-10-17 22:00:00pyscripterlinkissue22213 messages
2019-10-17 22:00:00pyscriptercreate