Module 'great_expectations' has no attribute 'get_context' in Pycharm with python 3.9

I got a very weird problem. I tried a lot of times to install the great expectations by pip and always got a error msg: module ‘great_expectations’ has no attribute ‘get_context’. I just run below 2 line code follow the sample code:

import great_expectations as gx
context = gx.get_context()

I run the code in pycharm ce, the interpreter is python3.9. I’ve tried the python 3.12 at first, the same problem.

As a new user, I had no any idea about it after I searched it in Google and asked Chatgpt, Claude AI, Gemini and etc. AI tools.

Any expert can throw any tip to me about it?

Many thanks!

sean

I am facing the same problem, any idea on how to resolve this.

Please try uninstalling and reinstalling, this seems like an issue that happens when the package is not installed correctly, also verify that PyCharm is using the same Python interpreter where great_expectations is installed.