Does simply uninstalling Python 3.9 and installing Python 3.8 again with Homebrew work?

巧了我就是萌 提交于 2021-01-07 02:37:45

问题


I used Python 3.8.6, installed via Homebrew on my Mac (Mac OS 11.1), and everything was fine. After upgrading Python to 3.9 (and later 3.9.1) with Homebrew, there is an issue with one of the moduls which might be caused by that and I want to go back.

Trouble with Python versions seems to be a quite common and there are tons of articles etc. about that, but so far nothing worked for me. pyenv is often recommended, but actually I do not need the 3.9 version at the moment and did not want to introduce another layer of complexity.

I found a tempting thread for a similar situation but following these advices confused somehow my pipenv which somehow still sticks to Python 3.9. (Update: meanwhile I could solve that problem).

Anyway, my idea was to simply run brew uninstall python and then brew install python@3.8 (or however addressing the 3.8 version works).

If I try so, there is a warning:

 % brew uninstall python
Error: Refusing to uninstall /usr/local/Cellar/python@3.9/3.9.1
because it is required by ffmpeg, glib, gobject-introspection, libass and libxml2, which are currently installed.
You can override this and force removal with:
  brew uninstall --ignore-dependencies python

Is it a good idea to ignore the dependencies? I assume everything will get fixed via installing the 3.8 version later, or at least brew doctor would somehow help me if something will go wrong by that.

By the way: how exactly is the brew command for installing Python 3.8?

来源:https://stackoverflow.com/questions/65336057/does-simply-uninstalling-python-3-9-and-installing-python-3-8-again-with-homebre

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!