V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
lyning
V2EX  ›  Linux

小白请教, ubuntu 15.04 更改 python3.4 之后软件中心打不开,改回 2.7 就恢复正常,求解?

  •  
  •   lyning · Oct 26, 2015 · 4112 views
    This topic created in 3844 days ago, the information mentioned may be changed or developed.
    8 replies    2015-10-27 10:43:03 +08:00
    ldsink
        1
    ldsink  
       Oct 26, 2015
    你是指把默认的 python 从 2.7 链到 3.4 么?有些内置软件是基于 Python2.7 的,直接改会让这些软件无法用的。
    gxustudent
        2
    gxustudent  
       Oct 26, 2015
    简单的说,就是 python3.4 不兼容 python2.7 。
    benatsh
        3
    benatsh  
       Oct 27, 2015
    软件中心依赖 python2.7 ,所以不要随便动系统下 /usr/bin/python ,能用 virtualenv 解决就用 virtualenv
    shell92
        4
    shell92  
       Oct 27, 2015
    ...我也是换成 python3 就用不了了,到现在还没解决,基本上什么软件都装不上,打算过段时间再重装一遍
    lyning
        5
    lyning  
    OP
       Oct 27, 2015
    @gxustudent 3.4 兼容不了 2.7 怎么会导致软件中心打不开呢?难道 ubuntu 15.04 是用 python2.7 写的吗?
    lyning
        6
    lyning  
    OP
       Oct 27, 2015
    @benatsh 意思是用 virtualenv 生成一个独立的 python 虚拟环境,然后在虚拟环境用 python 3.4 ,本机用 python 2.7 ,需要用到 python 3.4 就开虚拟环境就好,对不对?
    lyning
        7
    lyning  
    OP
       Oct 27, 2015
    @shell92 重装系统?不需要的,改回 2.x 就好了,装个 virtualenv 作为 python 3 的独立虚拟环境,要用 python 3 就切换到虚拟环境就好了,方便学习,又不会导致其他软件不能用的现象,虽然麻烦了点
    lyning
        8
    lyning  
    OP
       Oct 27, 2015
    @ldsink 原来是这样,明白了,谢啦
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5985 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 52ms · UTC 02:04 · PVG 10:04 · LAX 19:04 · JFK 22:04
    ♥ Do have faith in what you're doing.