aws / sagemaker-python-sdk

A library for training and deploying machine learning models on Amazon SageMaker
https://sagemaker.readthedocs.io/
Apache License 2.0
2.1k stars 1.14k forks source link

Upgraded pip fails to install packages with enum34 #1469

Closed ehsanmok closed 4 years ago

ehsanmok commented 4 years ago

Describe the bug Upgraded pip to the v20.1 fails to install GluonTS. Need to remove enum34 from conda envs.

To reproduce

python -m pip install --upgrade -q pip
python -m pip install -q git+https://github.com/awslabs/gluon-ts@master 

Screenshots or logs

AttributeError: module 'enum' has no attribute 'IntFlag'

System information A description of your system. Please provide:

Additional context

Related to #1428

nadiaya commented 4 years ago

Just to clarify, you're referring to the mxnet_p36 environment in a SageMaker Notebook Instance?

ehsanmok commented 4 years ago

Correct!

laurenyu commented 4 years ago

looks like it's due to the installation of enum34 here. Since this library still supports Python 2 (for now), we do need some kind of change that is compatible with Python 2 before blindly removing enum34.

as a workaround, are you able to manually uninstall enum34 before installing GluonTS?

ehsanmok commented 4 years ago

@laurenyu yes I can pip uninstall it in python3.6. Since SageMaker kernels are either p27 or p36 then it'd make sense to remove it as part of v2.0.0, py27 deprecation plan #1461

laurenyu commented 4 years ago

Glad you at least have a workaround for now.

re: v2.0.0 - yep, I was thinking the same thing 🙂. I've added it to the description of #1461, and will add this issue to the milestone/project board. If I get a chance, I'll still try to see if there's a Python 2-compatible solution, but from the quick Googling I did yesterday, pretty much everything seemed to point to enum34 🤷‍♀️

laurenyu commented 4 years ago

addressed in #1609 and slated for the v2.0.0.rc1 release

laurenyu commented 4 years ago

released in v2.0.0.rc1