Hi Guys,
I’ve created a virtual environment in all our windows server agents:
cd C:\FinalBuilder\Utils & python -m venv LimitedPolicyVenv
I then activated the environment and installed the lxml package (pip install lxml)
I do see it when running pip freeze while the venv is activated
I then try to run a Continua CI 1.9.2.1388 “Python” action to run a script
I check “Use command line executable in virtual environment scripts folder if it exists”
and set the working folder to C:\FinalBuilder\Utils\LimitedPolicyVenv
Which is my virtual environment as noted above (it has a “Scripts” folder in it)
I then run the Continua CI configuration / stage / action -
And it fails due to a missing lxml module:
Python [services_lister.py] Failure
Parameters
Working Directory: C:\FinalBuilder\Utils\LimitedPolicyVenv
Executable: C:\Program Files\Python312\Python.exe
Arguments: -q services_lister.py Deployment\AutoMarketingDeployment-FB7\AutoMarketingDeployment.config.xml QA --ci_var ServicesList_AutoMarketing
Environment Variables (user- or action-defined)
No environment variables specified
Output
Traceback (most recent call last):
File "C:\FinalBuilder\Utils\LimitedPolicyVenv\services_lister.py", line 5, in <module>
import lxml.etree as ET
ModuleNotFoundError: No module named 'lxml'
Am I doing something wrong?
Can you kindly explain how can one run a python script inside a pre-existing virtual environment folder, making sure the virtual environment is properly activated first?
Thanks!
Arik