macOS 10.12
Seems like the same problem here but top answers just led to more questions.
Top answer says to do:
brew link --overwrite python
which yields:
Warning: Already linked: /usr/local/Cellar/python/3.6.5
To relink: brew unlink python && brew link python
I'm pretty sure I need to get homebrew to switch to 2.7 rather than using version 3. I do
brew unlink python && brew link python
and get:
Unlinking /usr/local/Cellar/python/3.6.5... 25 symlinks removed
Linking /usr/local/Cellar/python/3.6.5... 25 symlinks created
Is there a way I can tell it to link to a specific version? /usr/local/Cellar/python/
contains: 2.7.13 2.7.14 2.7.14_3 3.6.3 3.6.5
How can I get my system to always use 2.7.14_3
?
/usr/local/opt/python/bin
contains python3
, python3-config
, and 3.6 versions. How can I get 2.7 in here and remove 3 and 3.6?
Also which python
returns /usr/bin/python
. When I type python -V
I get Python 2.7.10
. /usr/bin
contains python2.7
, python2.7-config
as well as some other seemingly-python-related things (but no python3, which is good I think). Is this different from homebrew pythons? Thanks in advance.
Edit:
Second-to-top answer says to do head -n1 /usr/local/bin/pip
which returns
head: /usr/local/bin/pip: No such file or directory
and
mv /usr/local/bin/pip /usr/local/bin/pip.old
returns
mv: rename /usr/local/bin/pip to /usr/local/bin/pip.old: No such file or directory
brew uninstall --ignore-dependencies python
(you might not want to --ignore dependencies
depending on what other things you might be breaking, i.e. numpy, opencv)
brew install python@2
see here
brew uninstall youtube-dl
brew install youtube-dl
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With