Error: Could not symlink bin/2to

2019-03-28  本文已影响0人  家电维修技师

你是不是安装完 Python3,然后在终端输入指令
python3 --version
却提示:
command not found

然后你按照网上的方法,在终端输入

sudo mkdir /usr/local/Frameworks
sudo chown $(whoami):admin /usr/local/Frameworks
brew link python3

却提示

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
MacBook-Air:~ lv$ brew link --overwrite python
Linking /usr/local/Cellar/python/3.7.3... 24 symlinks created

你不知所措,网上又找不到资料,怎么办呢?其实我们英语好点,或者仔细看一下这些英文,就会发现,其实苹果终端已经告诉我们解决办法了,解决方法有两个

To force the link and overwrite all conflicting files:
  brew link --overwrite python

强制链接并覆盖所有冲突文件:
  brew link --overwrite python
To list all files that would be deleted:
  brew link --overwrite --dry-run python

列出要删除的所有文件:
  brew link --overwrite --dry-run python

和我的图一样,直接在终端输入
brew link --overwrite python

然后你在查看 python3 --version 就能打印当前的 Python3 版本了

【原创:iOS第九层】

上一篇 下一篇

猜你喜欢

热点阅读