Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/2to3
Target /usr/local/bin/2to3
already exists. You may want to remove it:
rm '/usr/local/bin/2to3'
To force the link and overwrite all conflicting files:
brew link --overwrite python
To list all files that would be deleted:
brew link --overwrite --dry-run python
Possible conflicting files are:
/usr/local/bin/2to3 -> /Library/Frameworks/Python.framework/Versions/3.8/bin/2to3
/usr/local/bin/idle3 -> /Library/Frameworks/Python.framework/Versions/3.8/bin/idle3
/usr/local/bin/pydoc3 -> /Library/Frameworks/Python.framework/Versions/3.8/bin/pydoc3
/usr/local/bin/python3 -> /Library/Frameworks/Python.framework/Versions/3.8/bin/python3
/usr/local/bin/python3-config -> /Library/Frameworks/Python.framework/Versions/3.8/bin/python3-config
==> /usr/local/Cellar/python/3.7.7/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python/3.7.7/bin --install-lib=/usr/local/lib/python3.7/site-packages
==> /usr/local/Cellar/python/3.7.7/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python/3.7.7/bin --install-lib=/usr/local/lib/python3.7/site-packages
==> /usr/local/Cellar/python/3.7.7/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python/3.7.7/bin --install-lib=/usr/local/lib/python3.7/site-packages
==> Caveats
Python has been installed as
/usr/local/bin/python3
This is probably a minor error, because python appears in my brew list:
Luos-Air:~ luoxiaoran$ brew list
gcc gdbm gmp isl libmpc mpfr openssl@1.1 python readline sqlite tcl-tk xz
Luos-Air:~ luoxiaoran$
But then when I type "which python3" I still get the mystery 3rd version of python:
Luos-Air:~ luoxiaoran$ which python3
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3
Luos-Air:~ luoxiaoran$
This error looks familiar, and I think troubleshooting this error was the reason I deleted the python framework in the first place (no worries, I reinstalled OS to an April backup so my Mac is not broken anymore, I think). Previously, Modeller Caretaker Ben Webb told me to: "edit your profile (maybe ~/.bashrc or ~/.zshrc) and remove /Library/Frameworks/Python.framework/Versions/3.8/bin from your PATH." which sounds like it would solve this error and all my problems, but I am not sure how to do so? Thanks!
Best,
Luna
Hi Xiao,This is a really basic question and I really recommend a good tutorial.But in short, when you ran /usr/local/bin/python3 you entered the interactive python environment. Only python commands will now work.You can exit by pressing Ctrl-Z or by typing exit().Type import modeller to is if the package is installed.Best,AjasjaOn Fri, 29 May 2020 at 13:02, Xiao Ran Luo via modeller_usage <modeller_usage@salilab.org> wrote:Hmm I ran /usr/local/bin/python3 and Terminal seems to be expecting something from me (the normal commands like "which python3" don't work anymore)? Sorry, I tried to find a Terminal tutorial but haven't found one that's helpful but not too difficult yet...How do I return to the normal Luos-Air:~ luoxiaoran$ and how do I edit my profile and remove that file from my PATH without deleting the python framework again?Luos-Air:~ luoxiaoran$ /usr/local/bin/python3
Python 3.8.1 (v3.8.1:1b293b6006, Dec 18 2019, 14:08:53)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> help
Type help() for interactive help, or help(object) for help about object.
>>> which python3
File "<stdin>", line 1
which python3
^
SyntaxError: invalid syntax
>>>
_______________________________________________On Fri, May 29, 2020 at 12:52 PM Modeller Caretaker <modeller-care@salilab.org> wrote:On 5/29/20 12:03 PM, Xiao Ran Luo wrote:
> Luos-Air:~ luoxiaoran$ which python3
>
> /Library/Frameworks/Python.framework/Versions/3.8/bin/python3
This is not Apple Python (/usr/bin/python3) or Homebrew Python
(/usr/local/bin/python3). Looks like you have a third version of Python
installed.
> So I guess I am still not using Homebrew's Python -how do I switch to
> using Homebrew's Python?
Run /usr/local/bin/python3 explicitly rather than just "python3". Or
edit your profile (maybe ~/.bashrc or ~/.zshrc) and remove
/Library/Frameworks/Python.framework/Versions/3.8/bin from your PATH.
> Sorry, I just realized there are a few more things my friend
> recommended I install, are these all okay to install?
You an install whatever Homebrew packages you like; they won't affect
your Modeller installation.
Ben Webb, Modeller Caretaker
--
modeller-care@salilab.org https://salilab.org/modeller/
Modeller mail list: https://salilab.org/mailman/listinfo/modeller_usage
modeller_usage mailing list
modeller_usage@salilab.org
https://salilab.org/mailman/listinfo/modeller_usage