# Python Virtual Environments

**URL:** https://forum.opentap.io/t/python-virtual-environments/2700
**Category:** Technical
**Tags:** python
**Created:** [August 25, 2026, 5:23pm UTC](https://forum.opentap.io/t/python-virtual-environments/2700 "2026-08-25T17:23:44Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![bice123](https://avatars.discourse-cdn.com/v4/letter/b/9d8465/32.png) [@bice123](https://forum.opentap.io/u/bice123)
#### Post date: [August 25, 2026, 5:23pm UTC](https://forum.opentap.io/t/python-virtual-environments/2700/1 "2026-08-25T17:23:44Z")

</div>

I am currently having an issue with OpenTap loading the Python virtual environment correctly during sessions, but skipping over the virtual environment during global initialization. Any tap CLI command, as well as the Runner startup process before a session is created, appears to bypass the configured virtual environment. I believe this is causing a “Caught exception loading: No module named _name_”. It only loads the provided python DLL path. I can see the path skipping the virtual environment under PythonEngine.PythonPath in the Runner logs. Once a session is created the logs show the path to the virtual environment followed by the path to the DLL. My plugins load correctly and the test plans are executed successfully during sessions. Could it be skipping the virtual environment path during global initialization and therefore the cause for the module not found exception?

---

<div class="post-metadata">

### Author: ![bice123](https://avatars.discourse-cdn.com/v4/letter/b/9d8465/32.png) [@bice123](https://forum.opentap.io/u/bice123)
#### Post date: [September 17, 2026, 10:55pm UTC](https://forum.opentap.io/t/python-virtual-environments/2700/2 "2026-09-17T22:55:07Z")

</div>

This causes runner based subject like “Set/Get ComponentsSettings” to fail because it does not load the virtual environment when it is loading the Python plugins. Is this is a known issue? OpenTap not adding the virtual environment’s at Runner startup?
