After installing chalice from pip, it seems to have installed the enum34 library, which breaks my pip.
Traceback (most recent call last):
File "/usr/local/bin/pip3.6", line 4, in <module>
import re
File "/usr/lib/python3.6/re.py", line 142, in <module>
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
Fixed it by removing the enum34 distribution from site-packages.
Are you able to provide steps to reproduce this? Generally Python ensures the stdlib comes first in sys.path and when I try to install both pip and enum34 into an environment locally, it all seems tow ork fine for me.
I am running the latest EC2 AMI.
I created a virtualenv with Python 3.6, pip installed chalice.
chalice downgraded pip from v10.0.1 to v.9.0.3 and installed successfully.
When I run pip after installing chalice, I get the error as stated above.
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.
Can we reopen this issue? I am experiencing the same problem with when installing chalice on python 3.6.
enum34 will not work with python 3.6 - https://stackoverflow.com/questions/45896474/installing-enum34-on-python-3-x-breaks-pip-for-python3-x
Steps to reproduce from a new Amazon Linux EC2.
I agree with @dnorton
I am also facing the same issue while setting up the chalice environment over virtualenv on Amazon Linux machine AMI for Python 3.6
(venv3) [[email protected] ~]$ chalice --version
Traceback (most recent call last):
File "/tmp/venv3/bin/chalice", line 4, in
import re
File "/tmp/venv3/lib64/python3.6/re.py", line 142, in
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
---- If I install it directly it works fine. Issue is to run the python3.6 and chalice on virtualenv.
@dstufft, if we can reopen this, I'll work on a fix for it. cc @jamesls @stealthycoin
Taking a look, let me see if I can repro this.
@dnorton what would be the proposed fix?
Confirmed repro, reopening.
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.
@jamesls, there is a python lib enum-compat that uses enum34 if the python is < 3.4 and the default enum if python >= 3.4 (that's from memory.)
Bad Bot, no closing...
Reopening issue. I've removed the label so hopefully that fixes things.
Cool, if it's just a package update to enum, that sounds good to me.
@jamesls, I created PR https://github.com/aws/chalice/pull/905
Let me know if you need anything else to move this forward.
This got merged in #905 closing.