Dvc: Brew install/upgrade dvc overwrites current version of python3

Created on 13 Jul 2020  路  4Comments  路  Source: iterative/dvc

I'm running on MacOS with python3.7.

When running brew install dvc or even brew upgrade dvc, my python was changed to python3.8 and it broke all my other virtual environments.

Not really a bug here but should be more careful about brew and forcing a python version.

Python has been installed as
  /usr/local/bin/python3

Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
  /usr/local/opt/[email protected]/libexec/bin

You can install Python packages with
  pip3 install <package>
They will install into the site-package directory
  /usr/local/lib/python3.8/site-packages

See: https://docs.brew.sh/Homebrew-and-Python
Python has been installed as
  /usr/local/bin/python3

Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
  /usr/local/opt/[email protected]/libexec/bin

You can install Python packages with
  pip3 install <package>
They will install into the site-package directory
  /usr/local/lib/python3.8/site-packages
awaiting response

Most helpful comment

For future reference, this is because homebrew changed their default python version from 3.7 to 3.8 last week (and is unrelated to the DVC brew package)
https://github.com/Homebrew/homebrew-core/pull/54912

All 4 comments

So please if you are suggesting for upgrade, do not force the update of python3! :)

@philipperemy IIRC homebrew guys updated it to 3.8 for us: https://github.com/Homebrew/homebrew-core/commit/bc452dce13767a10c673ef442fd8ff3c9d0dc8e7 because they are migrating to 3.8 by default. Looking through the formulas, all of them depend on 3.8, so this is a homebrew policy that we can't really do much about :slightly_frowning_face: If you need very specific python version, I would suggest using something like pyenv. python brew package will be upgraded along with any package that depends on it, not only dvc.

Oh I see then nothing to do... Just to keep in mind!

For future reference, this is because homebrew changed their default python version from 3.7 to 3.8 last week (and is unrelated to the DVC brew package)
https://github.com/Homebrew/homebrew-core/pull/54912

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kskyten picture kskyten  路  44Comments

pared picture pared  路  73Comments

dmpetrov picture dmpetrov  路  64Comments

danfischetti picture danfischetti  路  41Comments

mdekstrand picture mdekstrand  路  43Comments