Home  >  Q&A  >  body text

linux - ubuntu下要如何升级python版本(包括yum等功能保留)

新手自学python2个月了,今天把ubuntu14.04 LTS从virtualbox双系统装到笔记本上,因为一直纠结于默认版本是2.7.4而不是2.7.11,故在我搞定了输入法配置,sublime text也能输入中文,下载好字体,安装好主题,换好壁纸,配置好terminator等等等等之后把python升级到2.7.11并换成了默认版本,然而在准备go to bed之际突然发现python shell的向左方向键变成了^[[A,然后yum,setuptools, easy_install,zlib一切毛病都来了……冲动之下把python删了打算重新把各种依赖包包重头安一遍,但始料未及的是一删有100+M依赖的包还好多的样子,现在都不敢重启了,有两个问题:

1.还有什么办法救一救不重装?如果花的时间不长,到底要如何处理?
2.我重装好系统后,我要怎么才能完美地把python2.7.4升级到2.7.11?

万分感谢!

怪我咯怪我咯2717 days ago402

reply all(6)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 17:45:53

    1. Change to Ubuntu16?

    2. Compile and install by yourself, change the soft link

    3. Don’t get entangled, there is not much difference between the two, the difference between 2 and 3 is not big

    So after I fixed the input method configuration, sublime text can also input Chinese, downloaded the fonts, installed the theme, changed the wallpaper, configured the terminator, etc., I upgraded python to 2.7.11 and changed it to the default version, but when I was preparing to go to bed, I suddenly found that the left arrow key of the python shell changed to ^[[A, then yum, setuptools, easy_install, zlib, all problems came... Impulsive I deleted python and planned to re-install all the dependent packages. But what I didn’t expect was that once I deleted the package with 100+M dependencies, it seemed much better. Now I don’t dare to restart it. There are two problems. :yum,setuptools, easy_install,zlib一切毛病都来了……冲动之下把python删了打算重新把各种依赖包包重头安一遍,但始料未及的是一删有100+M依赖的包还好多的样子,现在都不敢重启了,有两个问题:

    话说,为毛是yum

    Speaking of which, why is Mao yum? Did you really try it?🎜

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 17:45:53

    Ubuntu uses apt-get instead of yum

    reply
    0
  • 高洛峰

    高洛峰2017-04-17 17:45:53

    Are you sure you are using Ubuntu? So embarrassing...

    reply
    0
  • 怪我咯

    怪我咯2017-04-17 17:45:53

    During the upgrade process, the original soft links should be retained and renamed

    reply
    0
  • 怪我咯

    怪我咯2017-04-17 17:45:53

    Nowadays Linux should all come with python2 and python3, right? ? Try python3 command. Anyway, I brought mine with me.

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 17:45:53

    What the hell is using yum on Ubuntu》》》

    reply
    0
  • Cancelreply