I use python 3.6.9 and asterisk 16.16.0 in Ubuntu 18.04.
If you know about AGI then you probably know about this line
#!/usr/bin/python
or this
#!/usr/bin/env python
if not then don't worry its tells the system to run this script in the Python interpreter.
So as far you know what I can do. but now my question is if I am use virtual environment for python using help of venv package and want defines path of that python environment in my AGI then what should I define.
My virtual environment store in following directory: /home/test/Documents/environments/test_env.
Try adding this path to the
$PATHvariable/home/test/Documents/environments/test_env/binThis directory contains scripts like
activate,deactivateetc. which are used for activating and deactivating the virtual env.Regarding the shebang,
#!/usr/bin/env pythonshould work properly if the virtual env is activated.Hope this is what you were looking for.