Is there a way to activate a newly created virtualenv within an Ant script such that any calls to <exec executable="python"> (site-packages lookups etc) uses the virtualenv and not the global shared path?
I should note that a solution must work on Windows, Linux and Mac.
You can refer directly to the executable in the virtualenv:
<exec executable="<virtual_env_dir>/bin/python">
...
This will automatically use the packages installed in the virtualenv rather than those in the base install.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With