After updating MacOS all python packages are gone

Hi all,


Today I updated my MacBook Pro from MacOS 10.15.5 to 10.15.6 and after this update, all my Python3 pip packages and modules were gone. Even my virtual environments are empty. Some symlinks are broken and Brew needs to basically reinstall everything... This is really annoying since this is time I could be spending on other, more important stuff.


Since I know how to reinstall all the missing things, my question is not how to reinstall them, but rather why and how this happened? I never had this before and would like to prevent this in the future.


Seppe

MacBook Pro 15″, macOS 10.15

Posted on Aug 25, 2020 1:40 AM

Reply

Similar questions

5 replies

Sep 28, 2020 2:36 PM in response to ArtASeppe

As I mentioned, my Python3 implementation using the python.org installer, and any add-on packages, whether installed into that specific distribution, or restricted to a particular venv — are uneffected by update/upgrades of macOS, Xcode, or even homebrew.


The problem with installing Xcode 11 and now 12 (which I believe silently updates the older 11.3 command-line tools versions, including Swift v5.3, and python v3.8.2 (2020-02-24) — is that it installs Python3 into /usr/bin (without pip), and unless you are really careful with your PATH setting, you may find yourself running Apple's Python3, instead of the one you expect. This may be what happened to your installed packages too — whacked by an Xcode update.

Aug 25, 2020 6:30 AM in response to ArtASeppe

I cannot explain why so much damage was done to your brew and python3 setup. I experienced no such disruption during my update from 10.15.5 to 10.15.6.


I suggest that you do not use homebrew to install and augment a Python3 development environment. The apparent difference in the macOS 10.15.5 to 10.15.6 update which had no effect on my Python3 development environment, venvs, or brew installation is that my Python3 (3.8.5) is installed directly from Python.org using their installer, and my PATH is setup to use their library, and /usr/local/bin first to keep away from /usr/bin/python3.



Sep 28, 2020 1:03 PM in response to VikingOSX

So the post above was posted when this happened to my MacBook at work. Now yesterday I updated my personal MacBook and the same issue occurred. I'm now on MacOS 10.15.6 too and all my virtual environments are broken, pip for python is gone missing (symlinks and what not) and other stuff is just broken. I'm a developer and never had anything like this happen before. Like I said before, I have no problem fixing these issues myself, but nevertheless it is very annoying and time-consuming.


Besides Python and Homebrew packages, I even have issues when using XCode or XCode command line tools related stuff after this update. Catalina has been a nightmare for me, full of bugs and something breaks on every update.

Hopefully this gets resolved with Big Sur, but I have my doubts since I think most of the problems I'm having since Catalina are due to getting support in for Catalyst built apps.


Seppe

Sep 29, 2020 1:00 AM in response to VikingOSX

After doing some research myself last night I came to the same conclusion that VikingOSX later posted.

It's not the MacOS update itself that breaks my envs en package links, but the XCode updates that come with it.


Resetting my PATH variable already fixes a lot of issues.

What my issue with XCode and swift development concern, reinstalling the XCode command line tools fixes almost everything.


Thanks to VikingOSX for setting me on the right path and finding a quick fix.

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.

After updating MacOS all python packages are gone

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