You have used the correct approach to install external python modules in Glue studio Notebook which uses Glue2.0/Glue 3.0
To investigate, I have setup in my environment and used below steps:
- Create Glue studio Notebook (Navigate to Glue Console --> In left side panel click on Glue studio --> Select Jupyter Notebook)
- Downlaod the simple-salesforce.whl file from pypi (https://files.pythonhosted.org/packages/60/3c/647da942ce0e1f024dc3e188ebc60ee28972ba1254e691e3512511b9062a/simple_salesforce-1.12.1-py2.py3-none-any.whl) and upload it to s3
- Use below code to install simple_salesforce
%additional_python_modules s3://library/simple_salesforce-1.12.1-py2.py3-none-any.whl) from simple_salesforce import Salesforce
It executed successfully without any issue. In your case i am suspecting you are using Sagemaker Notebook backed by Glue Devendpoint which uses Glue 1.0 and does not support additional_python_modules. Can you please check and confirm once again if you are using correct notebook or not.
You can provide multiple python modules using %additional_python_modules in notebook. In above example you have not provided the absolute whl file path of pandera module. Please provide the absolute path for each modue separated by comma.
%additional_python_modules s3://library/simple_salesforce-1.12.1-py2.py3-none-any.whl, s3://library/pandera-0.11.0-py3-none-any.whl
So it works when I just did one module. I can import additional without issue. I tried the module in separate code and it works.
When I do more than one modules following the documentation. It doesn't work.
Let me know what else am I missing. Thanks for your help so far.
Can you please try to provide module names directly instead of proving the whl file. Please use below line once and let me know.
Jupyter Lab showing dead kernal on EMR notebookasked 7 months ago
Sagemaker Jupyter Studio Notebook public sharingAccepted Answerasked a month ago
Can't Import Modules In Sagemaker Jupyter Notebookasked 2 days ago
Using External Python Packages on AWS Glue.asked 7 months ago
How to install Phyton package in Jupyter Notebook instance in SageMaker?Accepted Answerasked 2 years ago
AWS Glue Jupyter Notebook additional modulesAccepted Answerasked a month ago
Installation of jupyter notebook on Deep Learning AMI GPU TensorFlow 2.9.1 (Amazon Linux 2)asked 10 days ago
unable to install psycopg2 in glue JUPYTER notebookasked 4 months ago
Cannot seem to import psycopg2 in AWS Glue 3.0asked 3 months ago
Glue Interactive Python Jupyter notebook sessionsasked 7 months ago