Reputation: 321
I had my previous python3.7 installed by Anaconda and then I installed python3.9 using homebrew. Then things really messed up. When I check my packages using pip3 list
, it shows no packages installed. I suppose it was sourcing the site-packages under python3.9. However, when I run python in terminal (which python3
), it showed that I was still running the old python3.7 which had all my packages. The problem is whenever I installed new packages, it didn't work because I was still running the old python3.7 while new packages were installed to python3.9.
Question:
Thank you very much!
Upvotes: 0
Views: 369
Reputation: 953
Make a list of your pip installed pacakages:
pip3 freeze > my_packages.txt
Uninstall python3.7:
sudo rm -rf /Library/Frameworks/Python.framework/Versions/3.7
With your new install of python3.9, install the previous packages:
pip3 install -r my_packages.txt
Upvotes: 1