在Mac上更新Python [英] Updating Python on Mac

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

问题描述

我想在Mac上将python 2.6.1更新到3.x,但是我想知道是否可以使用终端来执行此操作,或者我必须从python网站下载安装程序?

I wanted to update my python 2.6.1 to 3.x on mac but i was wondering if its possible to do it using terminal or i have to download the installer from python website?

我问这个问题的原因是因为安装程序未更新我的终端python版本.

The reason why i am asking this question is because installer is not updating my terminal python version.

推荐答案

不应将OS X上的默认Python弄乱,因为OS本身会使用它.如果您的默认值为2.6.1,那么您必须具有Snow Leopard.

The default Python on OS X shouldn't be messed with as it's used by the OS itself. If your default is 2.6.1 then you must have Snow Leopard.

如果仅从标准3.1磁盘映像安装,那么您可以在终端上使用python3.1调用它(您无需执行任何其他步骤即可工作),并且可以将普通的python保留为2.6.1.

If you just install from the standard 3.1 disk image then you can invoke it using python3.1 from the terminal (you don't have to do any extra steps for this to work) and you can leave the plain python as 2.6.1.

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

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