2022-05-30
Python venv doesn't work if directory names change
I changed my python project directory, then venv (virtual environment) didn't work properly.
Easy way to fix is to remove the venv
and just create a new one. But there's another way if you will.
/Users/minhokim
Make a directory
Create a virtual environment inside
Change parent directory name
project1 -> project2
It's broken; venv is still pointing to previous directory name, project1
Change path to current
project1 -> project2
project2/venv/bin/activate
code venv/bin/pip
code venv/bin/pip3
code venv/bin/pip3.8
... etc