/usr/bin/env: ‘python’: No such file or directory

0 votes

Hi Guys,

I am trying to run one python script to fetch dynamic IP. But it is showing me the below error.

/usr/bin/env: ‘python’: No such file or directory
Sep 18 in Python by akhtar
• 28,160 points
267 views

1 answer to this question.

0 votes

Hi@akhtar,

It seems your python script is not able to find python in your system.  You may have python3 installed in your system. But it is finding /usr/bin/python folder. So you can create a symlink to it.

$ sudo ln -s /usr/bin/python3 /usr/bin/python
answered Sep 20 by MD
• 65,200 points

Related Questions In Python

0 votes
2 answers
+2 votes
6 answers

How can I change directory or "cd" in Python?

Context Manager: cd import os class cd:     """Context manager for ...READ MORE

answered Oct 18, 2018 in Python by Nabarupa
4,732 views
0 votes
1 answer

Open a file if it exists or create and open it does not exists - Python

You can use this: f = open("ex.txt","w+") Here the ...READ MORE

answered Jun 20, 2019 in Python by Jason
2,664 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 1,452 views
0 votes
0 answers
+4 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,800 points
1,085 views
0 votes
1 answer

Error executing Jupyter command 'notebook': [Errno 2] No such file or directory

Hi@akhtar, I think there is a problem with ...READ MORE

answered Jun 25 in Python by MD
• 65,200 points
374 views
0 votes
1 answer

how to solve the error : "ImportError: No module named Tkinter" in python.

Hi@Umama, If you are using Linux system, then ...READ MORE

answered Apr 27 in Python by MD
• 65,200 points
3,595 views