0

Environment: Glue 3.0, Python 3.7

Downloaded and added wheel file in Glue's Python library path of lxml-4.8.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl which I downloaded from pypi.

I am trying to run:

from lxml import objectify

But am getting the following error: ImportError: cannot import name 'objectify' from 'lxml' (/tmp/lxml-4.8.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl/lxml/init.py)

I've seen this post and the likes of it, but can't install manually inside a managed service like Glue.

Any help?

stickfigure
  • 13,458
  • 5
  • 34
  • 50
Aakash Basu
  • 1,689
  • 7
  • 28
  • 57
  • Is there a reason you're wanting to do a whl file? ie why not add the `--additional-python-modules` key with a value of `lxml` as a Job Parameter? – Bob Haffner May 18 '22 at 22:55
  • I can do that, but it still would pull the same package internally and install, isn't? – Aakash Basu May 18 '22 at 23:20
  • 1
    Yeah, i wasn't confident your whl file would work, but I checked it and it does work. So you could do just `lxml` or you could do something like `s3://my-bucket/lxml-4.8.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl` Both values should work with `--additional-python-modules` – Bob Haffner May 18 '22 at 23:48
  • Did you ever get this working? – Bob Haffner May 21 '22 at 16:40
  • Yes Bob, it worked with additional python modules, but the exact same version when kept in S3 is failing. So, I continued with the prior one. You can write it as an answer and I'll accept it as working. Thanks for your help! – Aakash Basu May 25 '22 at 12:29

0 Answers0