Lots of other threads about similar issues, but none that I could find where quite the same case as mine. So, here goes:
Things I did:
I've managed to get this working after having the same problem you've described here by editing my ~/.bash_profile and adding this:
export WORKON_HOME=$HOME/code/.virtualenvs
export PROJECT_HOME=$HOME/code
export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python
export VIRTUALENVWRAPPER_VIRTUALENV=/usr/local/bin/virtualenv
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'
source /usr/local/bin/virtualenvwrapper.sh
Save, close.
then:
$ source ~/.bash_profile
and:
$ mkvirtualenv test
I don't know if it's relevant to anyone but I got this error while editing ~/.zshrc while virtualenv being active. So I had to deactivate and then rmvirtualenv env_name to remove the errors. And then I recreated the env: mkvirtaulenv env_name and workon env_name and this time I got no errors.
Hope it helps someone.
In Ubuntu 20.xx, virtual env can be created only by specifying python executable path.
$ which python3
/usr/bin/python3
$ mkvirtualenv --python=/usr/bin/python <name_of_your_virtual_env>
Try to uninstall your virtualenv and virtualenvwrapper and install it again using pip (check if you symlink your pip or assigned an alias on it for other version) in version 2.7 (I think).
I encountered the same error and I just did this and solved my problem.
I using Ubuntu machine.
I hope this help.