Where to download python 2.6




















You can write scripts using any text editor you like, and run them using the basic command-line interpreter, but almost all installations of Python come with a very nice integrated development environment called idle , which offers a smarter interpreter window and also an easy-to-use editor that's aware of Python syntax. You do not need to install a graphics package to run idle, since any modern computer will have a suitable windowing system.

On Linux systems, idle uses the x11 windowing system, which is also the native windowing system for Linux. This is useful, because it allows idle to be run on a server but put up a window on your own computer over the network. Mac OS X comes shipped with both x11 and its native windowing system; the current versions of Python for the Mac use the native windowing system to run idle , and Windows implementations also use the native Windows windowing environment.

If you are using Python by logging into a server, you will need x11 on your own machine in order to use idle , or indeed to see any graphics on your own screen. This section is only for Mac and Linux users who want a quick-start without needing to do a Python installation of their own.

It is highly recommended to do a fresh installation, so most users should just skip to the next section. All Mac OSX operating systems since Most Linux systems also come with a complete and usable Python installation.

On a Mac, and to a lesser extent on Linux, it is recommended that you do a separate Python installation of your own, so you have better control of which version you are using and so you don't have to mess with stuff in the operating system directories.

On Mac OS Nonetheless, to get started learning the language, and for doing basic computations, the pre-installed versions are fine. As far as I am aware, Windows never comes shipped with Python, so the following instructions in this topic apply only to Mac and Linux. If you have a pre-installed version, that's enough to get you started with the language, but chances are you'll soon want to scroll down to the Installing Python heading below, and learn how to install a customized version.

To find whether you have Python, and which version, open a terminal window that's any window on Linux, and the window you get with either the Terminal utility or x11 on Mac and type.

This will bring you into the python interpreter, and you will get a python prompt. If the computer complains that the command wasn't found, then python isn't installed.

If you get the prompt, it will also tell you what version of Python you have, and what version of the compiler it was built with which matters for a few compiled add-on modules. Assuming that you have gotten the Python prompt, to find if you have numpy , just type.

If everything is OK, you'll just get the Python prompt back with no message. If numpy isn't installed Python will tell you it can't find the module. Now you can quit Python by typing control-D , and check to see if you have idle installed. To do that, go to a terminal window and type.

If you are on a Mac with a relatively recent operating system or installation of Python, this will work regardless of whether you are using a plain terminal window or an x11 terminal window an xterm , since once it starts up idle, the native Mac windowing system is used.

On older installations idle uses x11 for windowing, and you need to start idle from an xterm, but Python never came pre-installed with idle on the older systems anyway. If you are starting idle on a remote server to which you are logged on through a terminal window, then you must be logged on via an xterm use ssh -Y to log in, or ssh -X on older systems , otherwise idle can't put up its window.

Either way, if everything is OK, you should get an idle Python shell window, with an idle menu bar either in the window or at the top of your screen, depending on the system. You should stay with a 2. X version, since Python 3. X is not backward compatible mostly because of some stupid changes they made to the print statement.

The current production version of Python is 2. You also need to decide whether to do a bit or bit installation of Python look here for an explanation. I am generally recommending staying with bits if possible, but 64 bit versions of the necessary libraries are gradually becoming widely available, so soon 64 bits will become the installation of choice. The PyNgl graphics package is now available in both 32 bit and 64 bit versions. By far the easiest way to install the basic Python software you need to run the courseware is to use the Enthought distribution, which is available in 32 and 64 bit versions for Mac, Linux and Windows and installs easily using a one-click installer.

This distribution gives you Python and numpy, and also gives you the excellent MatPlotLib graphics package. Currently, my ClimateGraphics. Using MatPlotLib with the Enthought distribution is by far the simplest way to go if you want to use graphics on a Windows machine, since then you won't have to install CygWin to get the the x11 windowing system used by PyNgl. There have been some problems reported in installing PyNgl on Debian Linux systems, and the Enthought distribution with MatPlotLib may be the solution of choice in that case as well.

If you want to use PyNGL with the Enthought distribution, you can install it on top of Enthought in precisely the same way you would if installing it on top of the Sourceforge Python distribution described below.

Python for all systems can be downloaded from python. Version 2. The precompiled binaries for 2. IPython 0. Welcome to pylab, a matplotlib-based Python environment.

For more information, type 'help pylab '. Python Scientific Computing Let's briefly check to see if the packages we need are there. Type in the following responses to the iPython prompts In [ So the EPD install worked.

Take a look at these instructions to see how to install and configure it to work with Python. Next click on the Python 2. If you know you're running a bit os, you can choose the x installer. Once the installer starts, it will ask who to install the program for. Usually installing for all users is the best choice.

After installed, you should now have a Python menu choice. This starts the python shell. You can type in simple commands to see how they work.

Try typing the following:.



0コメント

  • 1000 / 1000