0

I did a release upgrade, followed by apt upgrade no problem, everything went smooth. Except, now virtual environments don't work at all. I have various one set up for various django projects I'm working on. When I try to run django manage.py runserver I get:

ModuleNotFoundError: No module named 'django'

OK, weird, so I'll try to install django again

ModuleNotFoundError: No module named 'pip'

And I cannot run pip outside the virtual environment, as explained here.

So what is the practice now? Do I need to recreate my virtual environments?

Update:
If I create a new environment (mkvirtualenv new_env) pip works fine.

Edit: Sorry, I forgot to add. I've updated from mainstream Ubuntu 22.10 to mainstream Ubuntu 23.04

Artur Meinild
  • 26,018
Yotam
  • 1,428

1 Answers1

0

I've tried @Raffa's solution but then I see that pip is not installed. Following that hint I found in another thread how to fix that:

python -m ensurepip --default-pip

After that I needed to install the packages again though.

Yotam
  • 1,428