ZED Python API within a Virtual Environment
This section explains how to set up the ZED Python wrapper in a virtual environment.
The whole setup is based on Anaconda, it handles virtual environments, packages and IDE.
Create a new environment #
To create a new environment that enables you to use the ZED Python wrapper select the
Environments tab on the left panel and then on
Create in the bottom of the page.
A dialog box appears, give a name to your new environment and click on
Your newly created environment is now listed below the
Add the ZED package #
At this point, these instructions will be adapted to our needs, the main difference is that we want to install it on our virtual environment and not directly on the computer.
To do so, click on its name and then on the triangle to select
As said for the ZED package installation, copy the file
get_python_api.py somewhere you can execute it without permission issues and then run it.
The ZED Package is now installed, and you can close the Terminal.
To be sure it is well set up, click on
Update index.., the ZED package named
pyzed should appear in your environment.
As samples are using OpenGL for display, updated OpenGL packages are also installed for Windows.
Use the ZED environment #
Be sure you have the ZED examples on your computer or download them.
Go back to the
Home tab on the left panel and select your environment.
Choose your preferred IDE, open a Python sample, and be sure you are really on your virtual environment, that’s all, you can run the sample!