Search code examples
pythonpipalexa-skills-kitrequirements.txt

Is there an alternative way to install dependencies for an Alexa Skill (requirements.txt is troublesome)?


I'm trying to develop an Alexa Skill which uses MechanicalSoup to scrape some data from a web search. My code works but I'm unable to install MechanicalSoup via the 'requirements.txt' file. I've even added all of MechanicalSoup's dependencies, like so:

boto3==1.9.216
ask-sdk-core==1.11.0
requests==2.25.1
beautifulsoup4==4.9.3
lxml==4.9.0
soupsieve==2.3.2.post1
urllib3==1.26.9
certifi==2022.5.18.1
chardet==4.0.0
idna==2.10
mechanicalsoup==1.2.0

but I'm having no luck.

My events log looks like this: enter image description here

Do you have any idea what I can do to get this to work? Is there a way to install directly with pip install, if so, how?

Thanks


Solution

  • Maybe:

    • your requirements.txt doesn't work? you could try to pip install -r requirements.txt on your computer, to see if the requirements actually work
    • Your build server builds with a different version of python then your computer? for example, you could have python 3.10, while alexa has python 2.7