Python

There are different installation options depending on your Python development environment and preference:

Option 1: Command-line usage

First, select your operating system:

Make sure Python 3 is installed. You can verify this by entering the following command into a terminal:

py -3 --version
# Example output:
# Python 3.8.6

To use the library, the output of this command must indicate version 3.8 or higher.

The Python Package Installer, pip, must also be installed. It typically comes with the standard distribution of Python, but you can check that it’s installed by entering the following command into a terminal:

py -3 -m pip --version
# Example output:
# pip 21.3.1 from C:\Python38\lib\site-packages\pip (python 3.8)

The Python version in brackets should match the version of Python that’s installed, otherwise you will not be able to install the library.

To install the library, enter the following command into a terminal:

py -3 -m pip install --user zaber-motion

Now you may create a file named "example.py" (replace example with your desired file name) to start programming in Python. Continue the Getting Started guide by running the example code.

Troubleshooting

If your version is too low or the command fails to execute, you may need to install a newer version of Python 3.

Updating

Before upgrading, determine which version of the library you currently have installed.

py -3 -m pip list

To update to the latest version (9.3.1):

py -3 -m pip install --user --upgrade zaber-motion

Option 2: PyCharm IDE and virtual environment

Make sure Python 3 is installed. The library supports version 3.8 or higher.

When creating a PyCharm project or a virtual environment, use the appropriate Python version. For example, in the image below the Base interpreter is Python version 3.8. If you cannot find an interpreter with the appropriate version, try reinstalling Python.

PyCharm project creation

After creating the project, you may verify the Python version by entering the following command into the PyCharm terminal:

python --version
# Example output:
# Python 3.8.6

To install the library, click on Python Packages tab at the bottom, search for zaber-motion and click the Install button.

Alternatively, enter the following command into the PyCharm terminal:

pip install zaber-motion

Now you may open the automatically created main.py file to start programming in Python. Continue the Getting Started guide by running the example code.

Updating

If you are already using the library and want to update to the latest version, you can do this by entering the following command into the PyCharm terminal:

pip install --upgrade zaber-motion

To determine which version of the library you currently have installed, enter the following command into the PyCharm terminal:

pip list