[jdiaz@minigoomba ~]$ rpm -q azure-cli
azure-cli-2.0.74-1.el7.x86_64
sadly even 'az feeback' doesn't work
[jdiaz@minigoomba ~]$ az feedback
Traceback (most recent call last):
File "/usr/lib64/python3.7/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib64/python3.7/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/usr/lib64/az/lib/python2.7/site-packages/azure/__init__.py", line 1, in <module>
锘縚_import__('pkg_resources').declare_namespace(__name__)
File "/usr/lib64/az/lib/python2.7/site-packages/pkg_resources/__init__.py", line 24, in <module>
import re
File "/usr/lib64/python3.7/re.py", line 143, in <module>
class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
Describe the bug
the az client absolutely doesn't work on Fedora 31 beta right now.
To Reproduce
Install the az cli as documented.
Expected behavior
az cli work like it does on Fedora 30.
Environment summary
Followed these instructions https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-yum?view=azure-cli-latest
Additional context
n/a
seems like some package conflicts. @joelddiaz can you run pip list |grep enum to see if you have any other enum related packages?
seems like some package conflicts. @joelddiaz can you run
pip list |grep enumto see if you have any other enum related packages?
[jdiaz@minigoomba ~]$ pip list | grep enum
[jdiaz@minigoomba ~]$
@joelddiaz I'm able to reproduce your issue. And the root cause is that python refers to python3 as default on Fedora 31 beta while on Fedora 30 python refers to python2. You can edit the second line of /usr/bin/az (result of which az) to specify using python2:
PYTHONPATH=/usr/lib64/az/lib/python2.7/site-packages python2 -sm azure.cli "$@".
Meanwhile, I will look for solutions to solve this issue when building the package.
Fedora 31 is released. Could you please create a new release of azure-cli that has this fixed?
I know this is fairly old but still an issue. In fact now the 2.7 modules for Azure are deprecated so the workaround isn't working. Anybody? Fedora is up to Python 3.7.7 and not much is working out of the box with az.
Most helpful comment
@joelddiaz I'm able to reproduce your issue. And the root cause is that python refers to python3 as default on Fedora 31 beta while on Fedora 30 python refers to python2. You can edit the second line of
/usr/bin/az(result ofwhich az) to specify using python2:PYTHONPATH=/usr/lib64/az/lib/python2.7/site-packages python2 -sm azure.cli "$@".Meanwhile, I will look for solutions to solve this issue when building the package.