How to import Python external libraries with Alexa Skill Kit SDK?

不羁岁月 提交于 2020-01-25 08:06:50

问题


I am developing a skill using Alexa Skill Kit SDK on Amazon Developer Console. My code has import numpy, which generates a runtime error.

All solutions that I have googled are about uploading numpy source code onto AWS, which I do not find it relevant to the Alexa Skill Kit.


回答1:


I think you are building an Alexa-hosted skill in python.

As the docs says:

You can use Python to install dependencies. You add dependencies in the requirements.txt file. An example of the code is shown below:

boto3==1.9.216


来源:https://stackoverflow.com/questions/58779561/how-to-import-python-external-libraries-with-alexa-skill-kit-sdk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!