Asterisk AGI python version

I have been using Python AGI scripts for a while, but I am stuck when trying to ship solutions.
I am used to building things in a virtualenv. I tried to use Anaconda to ensure the python version is same as mine but the agi script runs using the systems python, even though which python shows the anaconda version of python.

Changing system python is dangerous as it can break things (broke yum on a centos6 machine trying to upgrade python2.6 to python2.7)

Is there a better way to handle these scenarios?

Do you not have the full pathname in the "! line?

1 Like

Let me try that, I have the path set to #!/usr/bin/python which is indeed pointing to the system’s default python version. Thanks it will help a lot of this is the cause for it!

UPDATE: It worked!