I am running a python script using AutoSys but it is giving error. The problem lies in the version of python, Instead of calling python 3.8 auto sys is calling python 2.7 How can I change the path of python in autosys?
Asked
Active
Viewed 708 times
1
-
I am running my code in ec2. – Fahad Vadakkumpadatah Apr 19 '21 at 10:36
-
1Assuming it's a Linux EC2 instance, log into that host and verify which python version is available/ installed ? – Piyush Apr 19 '21 at 11:25
-
1Also, check by updating Autosys job command attribute as "python3 /absolute_path/script.py" – Piyush Apr 19 '21 at 11:29
-
@Piyush thanks a lot it worked by giving full path of python3 – Fahad Vadakkumpadatah Apr 28 '21 at 07:59
-
1glad to know it was of some help. In that case, could you please accept my answer. – Piyush Apr 28 '21 at 11:27
1 Answers
1
Options:
Step1: Check the python version on the host. Below would confirm the path of the respective python binary.
bash-3.2$ which python
/usr/bin/python
bash-3.2$ which python3
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3
Step2: Check Autosys job attribute to use python for 2.x and python3 for 3.x
update_job: YourAutosysJobName
command: python3 /absolute_path/python_script.py
Happy to help !!

Piyush
- 818
- 8
- 17