Installing python libraries

Hi,

I am trying to basically import libraries into a python service and I can not find any documentation how to do so. So far what I have is the example telemetry_py from the github which runs successfully. I then try just adding one simple import line and the mission does not work. I did then try adding to the mission.yaml file the library I needed and then the airsdk build throws back an error “Error in mission.yaml file: Service example_telemetry: Unknown dependency digi”. Any support in how in the heck to get a python service with the libraries it needs would be highly appreciated.

Thanks all :).

Hi @jhynes,

The documentation has not yet been generated so it is normal that you couldn’t find how to get a python dependencies.

However, it is already available with new release 7.7.2 of airsdk-cli.
In your mission.yaml file, you can add Python pip packages with these lines:

...
pip:
  requirements:
    - digi
...

So, your mission.yaml file will look like this:

api_version: 3
kind: Mission
metadata:
  uid: com.parrot.missions.samples.telemetry_py
  name: telemetry_py
  description: telemetry python example mission
  version: "0.0.0"
targets:
  Anafi Ai:
  Anafi Ai Simulator:
pip:
  requirements:
    - digi
services:
  example_telemetry:
    lang: python

Best regards,
Trang

This topic was automatically closed after 30 days. New replies are no longer allowed.