简体   繁体   中英

Unable to open python on linux

I know this may be the most silliest questions to be asked but i'm suddenly not able to open python from terminal. I have python 2.7 installed on ubuntu 14.04 box, but now when i fire python on my command line i get the error

aman@L-JZCHG32:~$ python

The program 'python' is currently not installed. You can install it by typing: sudo apt-get install python-minimal

I have tried reinstalling python

sudo dpkg -P python2.7
sudo apt-get install python2.7

but it still wont work. Can somebody suggest me what went wrong and how can i correct it. Thanks.

It seems you've probably corrupted your PATH variable. Try /usr/bin/python in the terminal. If that works, you'll need to fix your PATH variable.

A quick fix would be export PATH=/usr/bin:$PATH but there's probably something not quite right with the whole path variable at the moment, which would be worth further examining.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM