Getting Started with Python

Multiple resources are available online to learn Python:

Useful External Python modules

In Python, modules provide reusable code of common routines, so that you don’t have to write it yourself. Python comes with a library of standards modules that are all available in the Micromine Origin & Beyond bundled and user-installed versions. Extra modules add more specific functionalities like plots, matrix calculation and interactive GUIs for instance.

Note: The following instructions assume you have a complete Python distribution installed, and will install modules globally for that distribution. If you are a Using venv or Installing Anaconda or Miniconda user, follow the instructions in those sections to ensure modules are correctly installed in your environment(s).

The Python Package Index (PyPI)

The Python Package Index is a repository of software for the Python programming language. Packages are generally published by the Python community and are available for download and installation via the Command Prompt using the Python package manager pip.

Installation of PyPI packages may be done using the command python -m pip install followed by the name(s) of the package(s). For example, the following command installs SciPy, NumPy, and Matplotlib:

	python -m pip install scipy numpy matplotlib

Note that PyPI packages must be installed with the correct Python installation to be detected by Micromine Origin & Beyond. You can check if your Python version is correct by running the following command in the prompt:

	py --list-paths

The asterisk in the output indicates the version active in the Command Prompt when you type "python". If version 3.12 does not have the asterisk prefix, you may replace "python" with the absolute path to the correct "python.exe". For example:

	C:\path\to\python.exe -m pip install scipy numpy matplotlib

Note that Anaconda (conda) versions of Python are not currently supported. Your Python 3.12 software must be installed directly.

SciPy Stack

The Scipy stack is a popular data science meta package that contains a lot of functionality for manipulating, analysing and visualizing data:

Installation

There are several ways to install the Scipy stack; however, care needs to be taken to use the correct method within the full Python 3.12 installed environment to ensure compatibility of the modules. Using pip is recommended.

	python -m pip install scipy
 

NumPy

NumPy is the fundamental package for scientific computing with Python. It contains among other things:

  • A powerful N-dimensional array object

  • Sophisticated (broadcasting) functions

  • Tools for integrating C/C++ and Fortran code

  • Useful linear algebra, Fourier transform, and random number capabilities

Most other libraries in the Scipy stack depend on Numpy. pip will install dependencies automatically as needed. To install NumPy independently run:

Installation
	python -m pip install numpy
 

Matplotlib

Matplotlib is a Python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive environments across platforms. Matplotlib can be used in Python scripts, the Python and iPython shell (ala MATLAB® or Mathematica®), web application servers, and six graphical user interface toolkits.

Installation
	python -m pip install matplotlib
 

Scipy

SciPy is a set of Open Source scientific and numeric tools for Python. It currently supports special functions, integration, ordinary differential equation (ODE) solvers, gradient optimization, parallel programming tools, an expression-to-C++ compiler for fast execution, and others.

Installation
	python -m pip install scipy
 

Pandas

Pandas is an open source, BSD-licensed library providing high-performance, easy-to-use data structures and data analysis tools for the Python programming language.

Installation
	python -m pip install pandas
 

EasyGUI

EasyGUI is a module for very simple, very easy GUI programming in the Python programming language.

Installation

	python -m pip install easygui
 

Note

Download and use of these files is taken to be acceptance of the following conditions:

  • Micromine Australia Pty Ltd does not offer any support for these external modules.

  • These modules are offered “as is” and without warranty of any kind. In no event shall Micromine Australia Pty Ltd or its subsidiaries be liable for loss of any kind whatsoever with respect to the download, installation and use of these modules.