Python3 on Linux

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
avmehta
Posts: 184
Joined: Mon Feb 03, 2020 10:27 am America/New_York
Answers: 0
Been thanked: 1 time

Python3 on Linux

by avmehta » Thu Mar 03, 2022 11:30 am America/New_York

Hello,
I am revisiting an old issue that was not resolved! I am trying to run gpt and getanc on a new linux virtual machine/container on NCCS adapt. I get a message '/usr/bin/env: ‘python3’: No such file or directory'. The system python version is 3.7.4 and I also updated requests (python -m pip install requests). I'd really appreciate your help.
Thank you.
Amita

Tags:

OB SeaDAS - xuanyang02
Subject Matter Expert
Subject Matter Expert
Posts: 644
Joined: Tue Feb 09, 2021 5:42 pm America/New_York
Answers: 1
Been thanked: 1 time

Re: Python3 on Linux

by OB SeaDAS - xuanyang02 » Thu Mar 03, 2022 11:40 am America/New_York

Hi Amita,

Could you do

Code: Select all

 seadas_info
and post the result here?

Thanks,

Bing

avmehta
Posts: 184
Joined: Mon Feb 03, 2020 10:27 am America/New_York
Answers: 0
Been thanked: 1 time

Re: Python3 on Linux

by avmehta » Thu Mar 03, 2022 12:01 pm America/New_York

Hi Bing,
when I try seadas_info I get the same message!
/usr/bin/env: ‘python3’: No such file or directory
Thanks.
Amita

OB SeaDAS - xuanyang02
Subject Matter Expert
Subject Matter Expert
Posts: 644
Joined: Tue Feb 09, 2021 5:42 pm America/New_York
Answers: 1
Been thanked: 1 time

Re: Python3 on Linux

by OB SeaDAS - xuanyang02 » Thu Mar 03, 2022 12:03 pm America/New_York

Could you please copy and paste the result of "SeaDAS-OCSSW -> SeaDAS/System Info" here?

OB SeaDAS - dshea
Subject Matter Expert
Subject Matter Expert
Posts: 258
Joined: Thu Mar 05, 2009 10:25 am America/New_York
Answers: 0
Been thanked: 2 times

Re: Python3 on Linux

by OB SeaDAS - dshea » Thu Mar 03, 2022 1:21 pm America/New_York

The problem is that you do not have a program called "python3"

Since you mentioned that you python is version 3 and not version 2.7, you need a link from python3 to python.
Assuming $HOME/bin is in your PATH, make a symbolic link

ln -s `which python` $HOME/bin/python3


don

gnwiii
Posts: 713
Joined: Fri Jan 29, 2021 5:51 pm America/New_York
Answers: 2
Has thanked: 1 time

Re: Python3 on Linux

by gnwiii » Sun Mar 06, 2022 8:05 pm America/New_York

avmehta wrote: Thu Mar 03, 2022 11:30 am America/New_York I get a message '/usr/bin/env: ‘python3’: No such file or directory'.
Just to clarify the problem: Linux distros generally follow the python.org recommendation to use "python" for version 2.x, "python3" for version 3.x, but ADAPT Anaconda uses "python", and https://www.nccs.nasa.gov/nccs-users/instructional/instructional-videos#anaconda describes an Anaconda environment. Don's suggestion:
OB SeaDAS - dshea wrote: Thu Mar 03, 2022 1:21 pm America/New_York ln -s `which python` $HOME/bin/python3
is certainly worth a try.

Post Reply