简体   繁体   English

如何使用Aptana Studio在mac os x和windows上安装Python?

[英]How to install Python on mac os x and windows with Aptana Studio?

How do I get python to work with aptana studio? 如何让python与aptana studio一起工作?

I've downloaded a bunch of stuff, but none of them seem to give me a straight text editor where I can interpret code into an executable type thing. 我已经下载了很多东西,但是它们似乎都没有给我一个直接的文本编辑器,我可以将代码解释为可执行类型的东西。 I know there's interactive mode in IDLE, but I want to actually use an editor. 我知道IDLE中有交互模式,但我想实际使用编辑器。 So I downloaded the pydev extensions for Aptana studio, but it wants me to configure a python interpreter (so I guess it actually doesn't have one). 所以我下载了Aptana studio的pydev扩展,但它要我配置一个python解释器(所以我猜它实际上没有)。 Where can I find a straight python interpreter that will work with this? 我在哪里可以找到一个可以使用它的直接python解释器? or another IDE? 还是另一个IDE?

It's easier than you think. 它比你想象的容易。 First, there's a version of python on your machine by default. 首先,默认情况下,您的计算机上有一个python版本。 It's kind of out of date, though. 但这有点过时了。

MacPorts is a nice method to get lots of good stuff. MacPorts是一个很好的方法来获得很多好东西。

ActiveState has a Python Mac package downloadable for free. ActiveState可以免费下载Python Mac软件包

Python.org will lead you to some other options as well. Python.org还将引导您了解其他一些选项。

To add the current Python version on Mac: 要在Mac上添加当前的Python版本:

  1. Add new interpreter via Aptana Studio 3/Preferences/PyDev/Interpreter-Python. 通过Aptana Studio 3 / Preferences / PyDev / Interpreter-Python添加新的解释器。
  2. Give it name (check version using the Terminal and then python or /usr/bin/python . 给它命名(使用终端检查版本,然后是python/usr/bin/python
  3. Then add the path (2.7 in my case): /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python 然后添加路径(在我的情况下为2.7):/ /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python 2.7 / /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python

If you install your own (2.6 in my case) use the following path instead: /Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python 如果您自己安装(在我的情况下为2.6),请使用以下路径: /Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python 2.6 /Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python

Don't forget to hit the "Apply" button... 别忘了点击“应用”按钮......

Idle has a complete text editor -- open a "new window" and type away. Idle有一个完整的文本编辑器 - 打开一个“新窗口”并输入。 Be sure to save it before you run it. 在运行之前一定要保存它。

What didn't you like about the IDLE editor? 您对IDLE编辑器不喜欢什么?

Also, look at Komodo Edit for Mac OS X. Very nice. 另外,看看适用于Mac OS X的Komodo Edit 。非常好。

For windows, I'd recommend the aforementioned ActivePython. 对于Windows,我推荐前面提到的ActivePython。 Mainly because it comes with Python win32, which you're going to end up installing anyway. 主要是因为它带有Python win32,无论如何你最终安装。

Secondly, if you're coming from the world of Java and C#, you might be expecting too much out of your IDE. 其次,如果您来自Java和C#世界,您可能会对IDE过多期待。 I eventually found that more powerful IDEs just made things more difficult than they helped. 我最终发现更强大的IDE只会让事情变得比他们帮助的更难。 So my advice is to try to go with something simple. 所以我的建议是尝试用简单的东西。 In other words, go with something that will let you jump in and start coding rather than bugging you with a lot of features you probably won't need anyway. 换句话说,选择一些可以让你跳入并开始编码的东西,而不是用你可能不需要的许多功能来窃听你。 :-) :-)

EDIT: One other thing, find and install pip . 编辑:另一件事,找到并安装点子 It makes installing python packages so much easier. 它使得安装python包变得更加容易。

A lot of the sites in the Windows list mirror the Mac list. Windows列表中的许多站点都反映了Mac列表。

Python.org has Win32 and Win64 installers. Python.org有Win32和Win64安装程序。

ActiveState has a free Python Win32 package downloadable for free. ActiveState免费下载免费的Python Win32软件包 There is no Win64 version (yet?). 没有Win64版本(还没?)。

PyWin32 is a Python package with extra modules for interfacing with Windows. PyWin32是一个Python包,带有用于与Windows连接的额外模块。 This is not Python itself. 这不是Python本身。 These haven't been updated for Python 3.0, though. 但是,这些尚未针对Python 3.0进行更新。 Despite the name, there is a Win64 version for Python 2.6 on this site. 尽管有这个名字,但在这个网站上有一个适用于Python 2.6的Win64版本。

On Mac OS X Leopard and Tiger, Python is already installed. 在Mac OS X Leopard和Tiger上,已经安装了Python。

On Mac, I've tried a few editor. 在Mac上,我尝试了一些编辑器。 Textmate is my current choice. Textmate是我目前的选择。 If you're looking for a free one, I really liked Xcode. 如果你正在寻找一个免费的,我真的很喜欢Xcode。 But you'll have to run your script from the command line. 但是您必须从命令行运行脚本。

If you want a cross-platform environment, you could try Eclipse and the pydev extension. 如果您想要跨平台环境,可以尝试Eclipse和pydev扩展。 So you don't get lost between the two platform. 所以你不要迷失在两个平台之间。

For Windows Operating system, If you want to work with python using Aptana Studio. 对于Windows操作系统,如果要使用Aptana Studio使用python。 You have to do some simple basic settings with the interpreter. 您必须使用解释器进行一些简单的基本设置。 For detailed step by step guide. 详细的分步指南。 You can follow this website link http://www.infoknol.com/aptana-python-setup-guide/ 您可以访问此网站链接http://www.infoknol.com/aptana-python-setup-guide/

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

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