Installing the Python Interpreter and the PyDev Development Environment for Eclipse
Hello everyone! Today I’ll explain how to get started developing your own programs in Python—specifically, how to install the interpreter and the PyDev development environment for Eclipse.
Installing the Python Interpreter
The interpreter is needed to process the source-code instructions in Python scripts, compile them into bytecode, and execute them on a virtual machine. I explain all these concepts and how Python works in the next article.
Installation on Windows
Download the ActivePython package and install it. I’ll explain why I chose this particular package in the next article. Then launch the Windows console (cmd.exe) through Start->Run (Win+R) and enter the command “python”. You’ll see the following:
C:\Documents and Settings\adw0rd>python
ActivePython 2.6.2.2 (ActiveState Software Inc.) based on
Python 2.6.2 (r262:71600, Apr 21 2009, 15:05:37) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
If you get the following message:
C:\Documents and Settings\adw0rd>python
"python" не является внутренней или внешней
командой, исполняемой программой или пакетным файлом.
then you need to add the path to “python.exe” to the “Path” system variable.
Installing Python on FreeBSD
Things are simpler here: first update the ports, then simply install Python from ports:
# cd /usr/ports/
# portsnap fetch update
# cd lang/python
# make install clean
# rehash
rehash is needed to make the “python” command available immediately, without restarting the terminal or having to enter the full path to the executable!
If you need a specific version, the following versions are available at the time of writing:
lang/python23
lang/python24
lang/python25
lang/python26
lang/python30
lang/python31
Integrated Development Environments (IDEs)
There are plenty of programs you can use as an IDE for Python. You could choose IDLE, as Mark Lutz, the author of “Learning Python,” recommends, or NetBeans, for example. However, I recommend installing Eclipse and the PyDev extension.
PyDev for Eclipse
Go to the extension’s page: Eclipse / PyDev and copy the “Update Site URL”:
Next, in Eclipse, open “Help -> Install new software…” and enter that URL there, click “Finish,” and follow Eclipse’s instructions. It will ask you to restart the IDE; do so. Then add a new perspective: “Windows -> Open Perspective -> Other… -> Pydev”, click “OK,” and that’s it—you’ve installed PyDev. Move on to the next article.
Comments are closed. Read the original discussion in Russian →

