Line magics in Glue Docker container not found

0

I am interested particularly in %additional_python_modules and I always get this error:

UsageError: Line magic function %additional_python_modules not found.

The same error is thrown when I try other magics:
UsageError: Line magic function %idle_timeout not found.
UsageError: Line magic function %worker_type not found..

I'm using amazon/aws-glue-libs:glue_libs_4.0.0_image_01 image

siyala
asked 2 months ago105 views
2 Answers
0
Accepted Answer

The magics are for the Glue Interactive session Kernel when used as part of a Jupyter notebook.
It has nothing to do with the docker container. In the container you can just use pip to install dependencies inside it (but will be gone when you stop the container).

profile pictureAWS
EXPERT
answered 2 months ago
  • Thanks, Gonzalo. Understood. However, I'm trying to install my own wheel package, for e.g.:

    %additional_python_modules s3://library/simple_salesforce-1.12.1-py2.py3-none-any.whl

    but the above error is thrown for the %additional_python_modules or any other for that matter. The same magics work inside of a Jupyter notebook when run in an interactive session

  • Yes, as I said magics only make sense inside of a Jupyter notebook when run in an interactive session

0

to close this one, I uploaded my package to PyPI and now I can import it into my notebook running in Docker. Thank you!

siyala
answered 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions