警告:python符号链接到python3

时间:2017-04-14 19:54:04

标签: python pip homebrew symlink

我非常有信心,我正在处理的repo中的某些要求的某些安装错误与我使用pip vs pip3以及我的python安装的一些符号链接错误有关。

我还记得用符号链接做一些愚蠢的事情,我试图让我的计算机上的默认python是python3而不是python2,但是找不到我用于此的实际命令(在SO答案上)

我运行brew doctor并获取:

Warning: python is symlinked to python3
This will confuse build scripts and in general lead to subtle breakage.

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
  /Users/dhruv/miniconda3/bin/python3-config
  /Users/dhruv/miniconda3/bin/python3.6-config
  /Users/dhruv/miniconda3/bin/python3.6m-config

我通过brew install pythonbrew install python3通过自制程序安装了python和python3。

正在运行python -V以及python3 -V给我:

Python 3.6.0 :: Continuum Analytics, Inc.

which python给了我:

/Users/dhruv/miniconda3/bin/python

brew info python给了我:

python: stable 2.7.13 (bottled), HEAD
Interpreted, interactive, object-oriented programming language
https://www.python.org
/usr/local/Cellar/python/2.7.13 (3,526 files, 48MB) *
  Poured from bottle on 2017-04-14 at 20:39:38

You can install Python packages with
  pip install <package>

They will install into the site-package directory
  /usr/local/lib/python2.7/site-packages

brew info python3给了我

python3: stable 3.6.1 (bottled), HEAD
Interpreted, interactive, object-oriented programming language
https://www.python.org/
/usr/local/Cellar/python3/3.6.1 (3,600 files, 55.8MB) *

  pip3 install --upgrade pip setuptools wheel

You can install Python packages with
  pip3 install <package>

They will install into the site-package directory
  /usr/local/lib/python3.6/site-packages

这里发生了什么?我是否犯了安装原生python 2.7的致命错误?我在Mac OSX 10.12.4(Sierra)上。

我尝试了brew unlink pythonbrew unlink python3,然后link,但brew doctor仍然遇到了相同的错误。

0 个答案:

没有答案