# Module 'great\_expectations' has no attribute 'get\_context' in Pycharm with python 3.9

**URL:** <https://discourse.greatexpectations.io/t/module-great-expectations-has-no-attribute-get-context-in-pycharm-with-python-3-9/1807>\
**Category:** GX Core Support\
**Created:** [July 15, 2024, 9:35am UTC](https://discourse.greatexpectations.io/t/module-great-expectations-has-no-attribute-get-context-in-pycharm-with-python-3-9/1807 "2024-07-15T09:35:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sharkspear](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@sharkspear](https://discourse.greatexpectations.io/u/sharkspear)\
**Post date:** [July 15, 2024, 9:35am UTC](https://discourse.greatexpectations.io/t/module-great-expectations-has-no-attribute-get-context-in-pycharm-with-python-3-9/1807/1 "2024-07-15T09:35:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Rahul](https://avatars.discourse-cdn.com/v4/letter/r/f14d63/32.png) [@Rahul](https://discourse.greatexpectations.io/u/Rahul)\
**Post date:** [January 8, 2025, 2:32pm UTC](https://discourse.greatexpectations.io/t/module-great-expectations-has-no-attribute-get-context-in-pycharm-with-python-3-9/1807/2 "2025-01-08T14:32:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![adeola](https://avatars.discourse-cdn.com/v4/letter/a/b487fb/32.png) [@adeola](https://discourse.greatexpectations.io/u/adeola)\
**Post date:** [January 28, 2025, 6:10pm UTC](https://discourse.greatexpectations.io/t/module-great-expectations-has-no-attribute-get-context-in-pycharm-with-python-3-9/1807/3 "2025-01-28T18:10:00Z")

</div>

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.
