# \[SOLVED\] Module installed but cannot import

**URL:** <https://discuss.python.org/t/solved-module-installed-but-cannot-import/34154>\
**Category:** Python Help\
**Created:** [September 19, 2023, 10:55pm UTC](https://discuss.python.org/t/solved-module-installed-but-cannot-import/34154 "2023-09-19T22:55:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![slim\_skulla](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/slim_skulla/32/14759_2.png) [@slim\_skulla](https://discuss.python.org/u/slim_skulla)\
**Post date:** [September 19, 2023, 10:55pm UTC](https://discuss.python.org/t/solved-module-installed-but-cannot-import/34154/1 "2023-09-19T22:55:38Z")

</div>

Hi everyone,

I’m extremely new to all of this. I went and installed Rich via pip and added the line

```python
from rich import pretty

```

but I’m getting the error 'no module named ‘rich’. My module is located in \venv\Lib\site-packages\pip\_vendor\rich\pretty.py

I also ran

```python
pip --version

```

and this is my output:

pip 23.2.1 from C:\Users\<username\>\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip (python 3.11)

I’ve tried reinstalling, restarting python, checking pip list to see if it’s installed and installing it for my current version. Nothing worked… Could somebody help me?

SOLUTION: I’ve ran cmd and activated the venv following this doc: [venv — Creation of virtual environments — Python 3.11.5 documentation](https://docs.python.org/3/library/venv.html#how-venvs-work)  
and installed rich from there. Works now!

---

<div class="post-metadata">

**Author:** ![hansgeunsmeyer](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/hansgeunsmeyer/32/15188_2.png) [@hansgeunsmeyer](https://discuss.python.org/u/hansgeunsmeyer)\
**Post date:** [September 19, 2023, 11:46pm UTC](https://discuss.python.org/t/solved-module-installed-but-cannot-import/34154/2 "2023-09-19T23:46:13Z")

</div>

Did you activate your Python venv?  
See: [venv — Creation of virtual environments — Python 3.11.5 documentation](https://docs.python.org/3/library/venv.html#how-venvs-work) - with notes how to do so.

---

<div class="post-metadata">

**Author:** ![slim\_skulla](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/slim_skulla/32/14759_2.png) [@slim\_skulla](https://discuss.python.org/u/slim_skulla)\
**Post date:** [September 20, 2023, 12:09am UTC](https://discuss.python.org/t/solved-module-installed-but-cannot-import/34154/3 "2023-09-20T00:09:18Z")

</div>

You’re a life saver. Thank you!
