简体   繁体   English

让Sublime 3 + Python 3在OS X上一起工作

[英]Get Sublime 3 + Python 3 work together on OS X

I am not only a total newcomer to Sublime text, but also to coding in general, so sorry if I am just to stupid to find an answer... 我不仅是Sublime文本的新手,而且还是一般编码的新手,对不起,如果我只是愚蠢地找到答案,...

I am working through my first python tutorial and want to start learning it with python 3. I also want to do that with Sublime Text 3 on OS X (I am also new to that). 我正在研究我的第一个python教程,并希望开始使用python 3学习它。我也想在OS X上使用Sublime Text 3来做到这一点(对此我也是陌生的)。 I found out that Sublime Text 3 works with Python 3, but, not on my system (Build 3047): 我发现Sublime Text 3适用于Python 3,但不适用于我的系统(内部版本3047):

import sys
print (sys.version)

2.7.2 (default, Oct 11 2012, 20:14:37) [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] [Finished in 0.0s] 2.7.2(默认值,2012年10月11日,20:14:37)[GCC 4.2.1兼容的Apple Clang 4.0(标签/Apple/clang-418.0.60)] [以0.0秒完成]

How can I get ST to work with Python 3?? 如何使ST与Python 3兼容?? I am searching the web for hours and found some people with the same problem but no answer (at least not on OS X). 我在网上搜索了几个小时,发现有些人遇到同样的问题,但没有答案(至少在OS X上没有)。

Download and install Python 3 from the Python releases page ; Python版本页面下载并安装Python 3; Mac OS X installers are available. Mac OS X安装程序可用。

Sublime Text 3 uses Python 3 internally, but that is an embedded Python not suitable for installing your own packages into. Sublime Text 3在内部使用Python 3,但这是嵌入式Python,不适合将自己的软件包安装到其中。

You ran the default system Python, on OS X 10.8 that is still version 2.7. 您在仍为2.7版的OS X 10.8上运行了默认系统Python。 If you have installed Python 3, make sure you start it with python3 . 如果已安装Python 3,请确保从python3启动。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM