amazon-braket-examples icon indicating copy to clipboard operation
amazon-braket-examples copied to clipboard

Compatibility with python>=3.8

Open Q-lds opened this issue 2 years ago • 1 comments

Hey there!

I managed to get my own container to work by downgrading my usual python version to 3.7.

I had an attempt to use python 3.8, but I failed. I manage to start from FROM 292282985366.dkr.ecr.us-west-2.amazonaws.com/amazon-braket-base-jobs:1.0-cpu-py37-ubuntu18.04, remove the present python installation and reinstall the version 3.8, but then from them CloudWatch I see that the main script is still called with python 3.7

Invoking script with the following command:
/usr/local/bin/python3.7 braket_container.py

While the libraries used in the docker the docker seems to, correctly, point to python 3.8

Error processing line 1 of /usr/local/lib/python3.8/site-packages/sphinxcontrib_serializinghtml-1.1.5-py3.9-nspkg.pth:
  Traceback (most recent call last):
    File "/usr/local/lib/python3.7/site.py", line 168, in addpackage
      exec(line)
    File "<string>", line 1, in <module>
    File "/usr/local/lib/python3.7/importlib/__init__.py", line 51, in <module>
      _w_long = _bootstrap_external._w_long
  AttributeError: module 'importlib._bootstrap_external' has no attribute '_w_long'

Anyway, before trying to debug what was going wrong in my docker could you confirm whether, currently, we need to run python3.7? Or are other versions supported?

Q-lds avatar Jul 15 '22 12:07 Q-lds

I guess I could try using PennyLanePyTorch1.8.0-cpupy38-ubuntu18.04 instead ... is there any lighter container? Or do I need the whole PeenyLane and Pytorch?

Q-lds avatar Jul 19 '22 15:07 Q-lds

Closing as Braket no longer supports Python 3.7

speller26 avatar Jul 12 '23 03:07 speller26