Python
There are different installation options depending on your Python development environment and preference:
- Option 1: Command-line usage
- Option 2: PyCharm IDE and virtual environment
Option 1: Command-line usage
First, select your operating system:
Operating system:
Make sure Python 3 is installed. You can verify this by entering the following command into a terminal:
Python 3 should be included in your standard Linux distribution. You can verify the proper installation by typing following command into a terminal:
py -3 --version
# Example output:
# Python 3.8.6
python3 --version
# Example output:
# Python 3.8.6
To use the library, the output of this command must indicate version 3.7
or higher.
In particular, Python version 2.x
is currently not supported.
If the only version of Python installed on your computer is 3.7
or higher, use python
instead of py -3
in the following commands.
Otherwise, if you have multiple Python versions installed or are uncertain, use py -3
when executing Python scripts.
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:\Python37\lib\site-packages\pip (python 3.8)
pip3 --version
# Example output:
# pip 21.3.1 from /usr/local/lib/python3.7/dist-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
pip3 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.
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 initializing the library in your 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.
If your version is too low or the command fails to execute, you may need to install packages using the terminal command:
sudo apt install python3 python3-pip
You may also need to update pip using the terminal command:
sudo -H pip3 install --upgrade pip
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 a terminal:
py -3 -m pip install --user --upgrade zaber-motion
pip3 install --user --upgrade zaber-motion
To determine which version of the library you currently have installed, enter the following command into a terminal:
py -3 -m pip list
pip3 list
Option 2: PyCharm IDE and virtual environment
Make sure Python 3 is installed. The library supports version 3.7
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.7
.
If you cannot find an interpreter with the appropriate version, try reinstalling Python.
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.7.4
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.
Now you may open the automatically created main.py
file to start programming in Python.
Continue the Getting Started guide by initializing the library in your 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