Two python versions in system

We have some python scripts for scheduled jobs. They are moved from a old machine and work very well automatically and manually. When we moved them to another machine, manually run them works fine. But they don’t work when we put them in corn.

After some search, there are two python versions in system. One is in /usr/bin and another one is in /usr/local/bin. Hmmm… That’s $PATH problem!

In bash shell, when we run the scripts manually, they are run by /usr/local/bin/python.

In cron, they are run by /usr/bin/python. Unfortunately, this version is too old to be compatible with our scripts.

%d bloggers like this: