one the best work that i found is using "pyenv"
by using pyenv make the lower version to your global version
then make directory, go inside, use below to make a virtualenv
you can use like this:
$ python3.7 -m venv env
after that activate the env:
$ source env/bin/activate
then:
$ which python
- you may make the pyenv to root level, actually if you search for install pyenv using brew or others you will find
the output shows the place of python codes.
copy them and past it to the last directory that you had problem with upgrade of it.
My issue:
i upgraded my python to latest(3.8.5) but unfortunetlly jupyter-lab and pip couldnt work, so after 9 hours i did this and it worked,
Topics we got threw:
installing pyenv:
$brew install pyenv
make it root as below:
$ PATH=$(pyenv root)/shims:$PATH
$ echo 'PATH=$(pyenv root)/shims:$PATH' >> ~/.zshrc
install your python versions:
$ pyenv install 3.7.0
$ pyenv install 3.8.5
make the lower to global:
$ pyenv global 3.7.0
Do the virtualenv things, codings are ended. get to the file Copy it, go the last directory and Past and Delete the originals in it.