enum problem
Answered
Hi
I encountered with enum declaration problem.

I try to install ( https://www.jetbrains.com/help/pycharm/installing-uninstalling-and-upgrading-packages.html ) , but it gives error

How can I solve this problem ?
Thanks for your time and support
Regards
Mehmet
Please sign in to leave a comment.
Looks like you already have `enum` installed for your project interpreter. Please run your script in the system Terminal with the same interpreter as you use in PyCharm. Do you have the same error?
Hi @Anna Marazova
Yes, I have same error
Here
But , when I import "enum" like that It works.
Don't Work
Work
Interesting :)
> Yes, I have same error
That means that the problem is not related to PyCharm.
Try to use `class Action(Enum)` instead of `class Action(enum.Enum)` in your code.
thanks @Anna Morozova for support
> But , when I import "enum" like that It works.
> Don't Work
> Work
> Interesting :)
In case of `from enum import Enum` you need to write `class Action(Enum)`. If you prefer `import enum` then use `class Action(enum.Enum)` instead.
Also please check https://stackoverflow.com/a/710603 , https://docs.python.org/3.5/reference/simple_stmts.html#the-import-statement