External python libraries in a AWS Glue python shell job

0

I am trying to use geopandas in a python shell job, but can't get it working.

I have tried following this guide: https://repost.aws/knowledge-center/glue-import-error-no-module-named and also providing a zip file of the library as well. In the first case it says 'No module named shapely' (with or without shapely in install_requires in setup.py). In the second case, it says 'No module named shapely.lib'

Any help would be appreciated. Thanks!

Guts
demandé il y a un mois158 vues
1 réponse
0

The easiest thing is just to use --additional-python-modules=shapely so it installs from pip.
If you use a zip, make sure the module inside is correct (you can unzip it locally, start a Python interpreter on the same directory and see if you can import it and it)

profile pictureAWS
EXPERT
répondu il y a un mois
profile picture
EXPERT
A_J
vérifié il y a un mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions