python3.0安装失败_安装了python3,在终端中找不到命令错误

1586010002-jmsa.png

I installed python3, I can open idle and it says it is running python3.0.1, but when I enter python3 in the terminal (on OSX) I get an error saying 'command not found'. Entering python gets me the 2.x version that came on the computer. Any advice on how I can access python3 from the terminal?

Thanks

解决方案

First, don't use Python 3.0.1. It has many problems and was officially retired upon the release of Python 3.1 (currently 3.1.2). You can find the python.org Mac OS X installer for 3.1.2 here. Once it is installed, then you need to ensure that the bin directory from the 3.1.2 framework (/Library/Frameworks/Python.framework/Versions/3.1/bin) is on your shell search path. You can manually modify an appropriate shell startup file, like .bash_profile. Or just double-click the Update Shell Profile.command found in /Applications/Python 3.1. In either case, you will need to open a new terminal window or re-login. Another approach is to install Python 3.1 from MacPorts or another distributor. Also, alpha releases of Python 3.2 are now available from python.org and elsewhere.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值