Lost python packages after MacOS update

I have the same issue as this thread:

https://discussions.apple.com/thread/251726190


I lost all my python packages after MacOS update. Even after resetting my PATH variable I do not recover my packages. I also used to work on a virtual environment:


$ source ~/.virtualenvs/myvenv/bin/activate

(myvenv) $


But now, when I access it I do not even have pip. Does anyone have the same issue? Do you know what caused this?

MacBook Pro 13″, macOS 11.3

Posted on May 19, 2021 1:31 AM

Reply

Similar questions

2 replies

May 20, 2021 5:35 AM in response to GhostDeini

When you create a Python virtual environment (venv), it creates links from the venv back to the installed Python framework's binaries (e,g. python3, pip3, etc.). When that Python distribution is removed from macOS, so goes the links from the venv to the frameworks executables and the ability to tell pip3 to list installed packages. Installing Python-3.9.5 from Python.org reactivated the links in my venv and enabled me to list my previously installed packages (pip3 list).


The source command to activate the venv does not change your current directory to that folder location. It is deceptive that it presents the venv folder name in parenthesis, but you remain (in your case) outside of the venv in your home directory.


This is how I remedy landing in the venv:




This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Lost python packages after MacOS update

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.