10.11.2016 Views

Learning Data Mining with Python

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 <strong>with</strong> <strong>Data</strong> <strong>Mining</strong><br />

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

new to <strong>Python</strong>:<br />

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

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

NonProgrammers<br />

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

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

Programmers<br />

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

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

the default location is C:\<strong>Python</strong>34. Next, enter this command<br />

into the command line (cmd program): set the enviornment to<br />

PYTHONPATH=%PYTHONPATH%;C:\<strong>Python</strong>34. Remember to change<br />

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

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

command prompt and run the following code:<br />

$ python3<br />

<strong>Python</strong> 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 command 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!