Created
June 19, 2021 14:58
-
-
Save youngsoul/5d87bb4134d99e1a7263bf0e91042921 to your computer and use it in GitHub Desktop.
Script to test the install of Tello libraries
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Test that the necessary imports and libraries are available | |
| def print_setup_instructions(): | |
| print("Make sure your python virtual environment is activated") | |
| print("Open a Terminal window (MacOS) or Command Prompt (Windows) and run:") | |
| print(""" | |
| pip install -r requirements.txt | |
| pip install https://github.com/damiafuentes/DJITelloPy/archive/master.zip | |
| """) | |
| try: | |
| import cv2 | |
| except: | |
| print("OpenCV is not installed") | |
| print_setup_instructions() | |
| try: | |
| from djitellopy import Tello | |
| except: | |
| print("DJITelloPy API is not installed") | |
| print_setup_instructions() | |
| try: | |
| import imutils | |
| except: | |
| print("imutils is not installed") | |
| print_setup_instructions() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment