PyCharm IDE

Programming with Python is beyond the scope of this course as we assume intermediate-level Python skills.  As a Python developer we expect you will have established your own way to work with and develop new applications, and Python has many options to accomplish this task. More advanced development with Python benefits greatly from the use of an Integrated Development Environment (IDE). If you are not already using an IDE that you are comfortable with, we recommend recommend the PyCharm IDE from JetBrains.  This section provides some details on how to get started using PyCharm.


jupyter / iPython

Researchers, and those working on personal projects may benefit from using iPython notebooks and a tool like the Jupyter Project. Jupyter is included as part of the standard Anaconda installation. You will also be able to run many of the tutorials from Jupyter and you will find Jupyter tutorial notebooks on GitHub: https://github.com/GeosoftInc/gxpy/tree/9.3/examples/jupyter_notebooks/Tutorials

Download and install PyCharm

Pycharm can be downloaded from https://www.jetbrains.com/pycharm/.  Install as per the instructions.

Refer to the excellent PyCharm documentation page if you are new to PyCharm or IDEs: https://www.jetbrains.com/pycharm/documentation/

Configure PyCharm to use the correct Python environment

When you start Pycharm for the first time you will see the welcome screen:

The first thing to do is configure the default project interpreter.  Select "Settings" from the "Configure" drop-down in the bottom right corner:

Select your Python Project Interpreter from the drop-down.  This must be the Python environment in which you installed the Geosoft python modules.  If your Python Interpreter does not appear in the drop-down, select the tool icon to find your interpreter.  You must see 'geosoft' in the Package list, as shown here (the Version and Latest may not match as these will follow Geosoft releases):

Select 'OK', and PyCharm will spend a bit of time configuring the IDE to work with all the packages that are part of your Python environment.  One of the reasons we recommend the Anaconda Python distribution is because it includes almost all the packages that are required for scientific development, which also means that the configuration of PyCharm can take a few minutes.  But once configured you are ready to go.

We suggest you create a new project named 'tutorial':

Note

This should be enough to get you started.  If you are already familiar with how IDE's work, you will find all the features of a full-featured IDE in PyCharm, together with the awareness of Python that makes for a powerful Python-specific working environment. We suggest you deepen your knowledge by referring to the PyCharm on-line documentation, and use Google search as your assistant.

The Hello World session provides detailed lesson on using PyCharm for a simple program and shows you how to debug a Python script from PyCharm.