24.07.2016 Views

www.allitebooks.com

Learning%20Data%20Mining%20with%20Python

Learning%20Data%20Mining%20with%20Python

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Getting Started with Data Mining<br />

The Python organization also maintains a list of two online tutorials for those<br />

new to Python:<br />

• For nonprogrammers who want to learn programming through the<br />

Python language: https://wiki.python.org/moin/BeginnersGuide/<br />

NonProgrammers<br />

• For programmers who already know how to program, but need to learn<br />

Python specifically: https://wiki.python.org/moin/BeginnersGuide/<br />

Programmers<br />

Windows users will need to set an environment variable in order to use<br />

Python from the <strong>com</strong>mand line. First, find where Python 3 is installed;<br />

the default location is C:\Python34. Next, enter this <strong>com</strong>mand<br />

into the <strong>com</strong>mand line (cmd program): set the enviornment to<br />

PYTHONPATH=%PYTHONPATH%;C:\Python34. Remember to change<br />

the C:\Python34 if Python is installed into a different directory.<br />

Once you have Python running on your system, you should be able to open a<br />

<strong>com</strong>mand prompt and run the following code:<br />

$ python3<br />

Python 3.4.0 (default, Apr 11 2014, 13:05:11)<br />

[GCC 4.8.2] on Linux<br />

Type "help", "copyright", "credits" or "license" for more information.<br />

>>> print("Hello, world!")<br />

Hello, world!<br />

>>> exit()<br />

Note that we will be using the dollar sign ($) to denote that a <strong>com</strong>mand is to be<br />

typed into the terminal (also called a shell or cmd on Windows). You do not need to<br />

type this character (or the space that follows it). Just type in the rest of the line and<br />

press Enter.<br />

[ 4 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!