Installing an IDE for Linux
=============================
Installing Python
-----------------
Note, if you are working in an Aalto Workstation, Python has already been installed. If you aren't, the first step is to install Python itself. Navigate to `Python site `_ and download the latest version.
Download and extract the downloaded tar file.
.. image:: kuvat/python-tar.png
:width: 640
.. image:: kuvat/python-extract.png
:width: 640
Navigate to the folder you extracted the tar file, and run the following commands:
``./configure``
``make``
``make test``
``sudo make install``
Python is now installed on your computer and you can move to install the IDE.
Installing PyCharm
------------------
Navigate to `PyCharm website `_ and download the Community Edition.
.. image:: kuvat/download-pycharm.PNG
:width: 800
Download and extract the tar package.
.. image:: kuvat/pycharm-tar.png
:width: 640
.. image:: kuvat/extract.png
:width: 640
Run PyCharm by navigating to the folder you extracted the tar package and insert command ``./pycharm.sh``
.. image:: kuvat/pycharm-ajo.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 ``, 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