Switching Python version (3.9 → 3.8) installed by Homebrew

前端 未结 2 1135
暗喜
暗喜 2021-01-25 17:36

It’s a very similar situation like described here, but vice versa. I have Python 3.8 installed via Homebrew and updated that to 3.9:

% brew list --formula | grep          


        
2条回答
  •  伪装坚强ぢ
    2021-01-25 18:20

    I'm glad you were able to fix the issue your own way, but let me add some advice. Generally speaking, downgrading Python (or really any program) is not usually a supported operation. Upgrading may upgrade dependencies in other packages that are not backwards compatible with older versions of Python or other dependencies. In short, you shouldn't even want to "downgrade" a package, ever.

    Instead, you should use multiple independent environments e.g. with virtualenv so that, if ever you need a lower version for some reason, you can replace the entire environment with a new one of lower version (note the subtle difference from "downgrading" because you are using a new environment completely).

提交回复
热议问题