本文介绍了将Python 3.2升级到Python 3.4在linux上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的Raspbian Linux上默认安装了Python 3.2,但是我想要Python 3.4( time.perf_counter 等)。通过 apt-get 安装Python 3.4没有问题,但是当我在shell中键入 python3 时,我仍然会得到Python 3.2 (因为 / usr / bin / python3 仍然链接到它)。我应该更改Symlink吗,还是有更好的做法?

解决方案

我将回答自己的问题,因为我找到了解决我的问题。在我的debian发行版设置为jessie之后,我以前在我的系统上运行了 apt-get upgrade 。这并没有取代python 3.2。更换它正在运行 apt-get dist-upgrade ;之后 apt-get autoremove 删除python 3.2。我怀疑这可能是一个问题,因为我没有安装任何外部图书馆。


I have Python 3.2 installed by default on my Raspbian Linux, but I want Python 3.4 (time.perf_counter, yield from, etc.). Installing Python 3.4 via apt-get is no problem, but when i type python3 in my shell I still get Python 3.2 (since /usr/bin/python3 still links to it). Should I change the Symlink, or is there a better was to do this?

解决方案

I'm going to answer my own question, since I have found a solution to my problem. I had previously run apt-get upgrade on my system after setting my debian release to jessie. This did not replace python 3.2 though. What did replace it was running apt-get dist-upgrade; after that apt-get autoremove removed python 3.2. I doubt that this could be a problem, since I hadn't installed any external libraries.

这篇关于将Python 3.2升级到Python 3.4在linux上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 22:53