简体   繁体   English

无法在Linux上打开python

[英]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. 我知道这可能是最愚蠢的问题,但是我突然无法从终端打开python。 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 我在ubuntu 14.04盒子上安装了python 2.7,但是现在当我在命令行上启动python时,我得到了错误

aman@L-JZCHG32:~$ python aman @ L-JZCHG32:〜$ python

The program 'python' is currently not installed. 当前未安装程序“ python”。 You can install it by typing: sudo apt-get install python-minimal 您可以通过键入以下命令进行安装:sudo apt-get install python-minimal

I have tried reinstalling python 我尝试重新安装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. 看来您可能已损坏PATH变量。 Try /usr/bin/python in the terminal. 在终端中尝试/usr/bin/python If that works, you'll need to fix your PATH variable. 如果可行,则需要修复PATH变量。

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. 一个快速的解决方法是export PATH=/usr/bin:$PATH但是目前整个path变量可能有些不正确,这值得进一步研究。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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