Installing an IDE for Windows
=============================

Installation Video (in Finnish)
-------------------------------

.. admonition:: Python-ohjelmointiympäristön asentaminen Windows-ympäristöön
  :class: aside

  .. raw:: html

    <iframe src="https://tarjotin.cs.aalto.fi/guides/pycharm/python-asennus/videos/pythonasennus.mp4" width="720" height="405" style="padding: 0px; border: 1px solid #464646;" frameborder="0" gesture=media allowfullscreen></iframe>



Installing Python
-----------------

First step is to install Python itself. Navigate to `Pythonin site <https://www.python.org/downloads/>`_ and download the latest version.

Run the downloaded exe file. 

.. image:: kuvat/pythonexe.PNG
  :width: 640

Choose Install Now so the installation executable can take care of everything. In some cases it is better to customise your installation. If you know what you are doing, do so.

.. image:: kuvat/installpython1.PNG
  :width: 800

Python is now installed on your computer and you can move to install the IDE.

Installing PyCharm
------------------

Notice, that PyCharm is already installed on the Windows Workstations, and the only thing you need to do is to save your projects on the Z-folder so they'll be available on all computers.

.. image:: kuvat/pycharm-location2.PNG
  :width: 800


Navigate to `PyCharm website <https:kuvat/kuvat/www.jetbrains.comkuvat/pycharmkuvat/downloadkuvat/#section-windows>`_ and download the Community Edition.

.. image:: kuvat/download-pycharm.PNG
  :width: 800

Run the downloaded exe file.

.. image:: kuvat/run.PNG
  :width: 640

Choose your preferred settings.

.. image:: kuvat/installation1.PNG
  :width: 800
.. image:: kuvat/installation2.PNG
  :width: 800
.. image:: kuvat/installation3.png
  :width: 800

Run PyCharm

.. image:: kuvat/welcome.PNG
  :width: 800

Choose your preferred theme.

.. image:: kuvat/teema.PNG
  :width: 800

Choose your preferred plugins.

.. image:: kuvat/plugarit.png
  :width: 800

Create a new project and add a new file to this project.

.. image:: kuvat/newfile.PNG
  :width: 800

Alternatively you can import files to PyCharm by going to Open, and choosing a template folder or a file.

.. image:: kuvat/importproject.png
  :width: 800

Write some code.

.. image:: kuvat/helloworld.PNG
  :width: 800

Installing Plugins in PyCharm
-----------------------------

Plugins offer extra functionality in addition to Python's default packages. Next we will install plugins numpy and scipy. Installing is easiest by clicking the Terminal button on PyCharm and then writing ``pip install <plugin name>``, so in our case ``pip install numpy`` and ``pip install scipy``.

.. image:: kuvat/pip.PNG
  :width: 800

Succesful install looks like this:

.. image:: kuvat/numpyscipyasennettu.PNG
  :width: 800

In addition to terminal, plugins can also be installed with a graphical user interface. Choose File -> Settings

.. image:: kuvat/settings.PNG
  :width: 800

In Settings choose your project and subsection Project Interpreter

.. image:: kuvat/projectinterpreter.PNG
  :width: 800

In Project Interpreter menu, press the + button oto open Available Packages menu.

.. image:: kuvat/install.PNG
  :width: 800

Write numpy in to the search box, and press the Install Package button to install plugin.

.. image:: kuvat/availablepackages.PNG
  :width: 800