There are two ways for Origin users to work with Python:

The following sections outline the benefits of each, to help you decide which approach is best for you.

Embedded Python

The key benefits of using the embedded python environment within Origin are:

  • Python is installed with Origin. Every new version will update the installation to a new version of Python. You do not need to worry about installing and maintaining it yourself.
  • Once you launch Origin, you can immediately write Python code and functions for use from with the Origin interface.
  • Python functions can be added and accessed from key tools such as Cell Formula and Setting Column Values, Curve Fitting, and Importing.
  • A package named originpro is pre-installed, allowing you to easily exchange data between your Python code and Origin worksheets and matrices. This package also provides access to various objects in the Origin interface in addition to exchanging data.
  • You can easily install additional Python packages using a GUI tool or using script.
  • Several built-in Origin projects and Workbook/Matrix templates using Python are provided as examples with the installation.

To summarize, if you are looking to extend your data processing and analysis to new areas not currently supported in Origin such as machine learning, neural networks, Bayesian regression or other advanced regression models, advanced signal processing, data processing using pandas, or even writing your own Python code to streamline your workflow using your existing Origin workbook and graph templates, then you can make use of the embedded Python environment in Origin.

External Python

If you do most of your data import/data acquisition and your data processing already in Python, and wish to simply push your processed data into Origin projects and perform further final processing and graph creation using Origin, then external Python may be a good choice for you.

You will need to have Python installed outside of Origin, which you may likely already have. Note that the embedded Python described in the above section is not affected by your external Python installation. You will however need to manage updates and installation of packages for your external Python yourself.

Within your external Python environment, you will then install the originpro package from pypi, which provides high level APIs for interacting with Origin. You will of course need to have Origin installed and licensed on your PC.