在 openSUSE 上安装最新的 Python [英] Installing newest Python on openSUSE

查看:113
本文介绍了在 openSUSE 上安装最新的 Python的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Zypper 包管理器在 openSUSE 系统(见下面的版本)上安装了 Python.这给了我 Python 3.2,但有些包需要 Python 3.3.使用 zypper update python3 更新仍保留在 Python 3.2 上.如何升级到 3.3,理想情况下使用包管理器并重用我正在运行的 Python 安装的其余部分(站点包、pip...)?

I installed Python on an openSUSE system (see version below) using the Zypper package manager. This gives me Python 3.2, but some packages require Python 3.3. Updating with zypper update python3 stays on Python 3.2. How can I upgrade to 3.3, ideally using the package manager and reusing the rest of my working Python installation (site packages, pip...)?

openSUSE 12.2 (x86_64)
VERSION = 12.2
CODENAME = Mantis

推荐答案

您可以添加 devel:languages:python:Factory 存储库或使用 1 单击安装和 Python 3.3.2 版本表单 这里(例如来自上面的 repo).
(显示其他版本->openSUSE 12.2->显示不稳定包->1点击安装)

You can add the devel:languages:python:Factory repository or use the 1 Click Install and a Python 3.3.2 version form here (e.g. from the above repo).
(Show other versions->openSUSE 12.2->Show unstable packages->1 Click Install)

要仅与 zypper 一起使用(无 GUI),您可以按如下方式添加存储库:

To use it with zypper only (no GUI) you can add the repo as follows:

sudo zypper ar http://download.opensuse.org/repositories/devel:/languages:/python:/Factory/openSUSE_12.2/devel:languages:python:Factory.repo

然后,要使用来自该 repo 的包,您应该给 repo 更高的优先级(在这种情况下,更高的优先级意味着较低的数字 0=high,100=low).要知道 repo id 使用 zypper lr 并在输出中搜索 repo 编号.然后使用以下命令更改优先级:

Then, to use packages from that repo you should give the repo a higher priority (in this case higher priority means lower number 0=high, 100=low). To know the repo id use zypper lr and search for the repo number in the output. Then use the following command to change the priority:

 sudo zypper mr -p priority repo_number

你可以使用例如如果您的其他存储库的标准优先级为 99,则优先级为 50.
然后使用zypper update python3更新python.

You could use e.g. 50 as priority if your other repos have the standard priority of 99.
Then use zypper update python3 to update python.

这篇关于在 openSUSE 上安装最新的 Python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆