OSX - 无法找到将python添加到我的路径中的内容

时间:2014-10-22 14:23:05

标签: python macos homebrew path-variables

我刚刚升级到OSX Yosemite。我正在运行brew doctor,并且它产生的数以万计的警告是:

Warning: /usr/local/share/python is not needed in PATH.
Formerly homebrew put Python scripts you installed via `pip` or `pip3`
(or `easy_install`) into that directory above but now it can be removed
from your PATH variable.
Python scripts will now install into /usr/local/bin.
You can delete anything, except 'Extras', from the /usr/local/share/python
(and /usr/local/share/python3) dir and install affected Python packages
anew with `pip install --upgrade`.

我到处仔细查看过,我找不到将/ usr / local / share / python添加到我的路径中的内容。我的.bash_profile没有提到python。 /private/etc/paths.d只包含一个名为“git”的文件。我确实在/ private / etc / paths中找到了/ usr / local / share / python的实例,但我删除了它,但是当我在此之后启动一个新终端并重新运行brew doctor时,我仍然收到警告。谁能建议我怎么能阻止这个?这让我疯了!

1 个答案:

答案 0 :(得分:0)

我无法评论,虽然我没有答案,但这可能有助于消除过程,或者可能有助于您未来的问题解决者。

  • etc/profile怎么样;该文件中的任何标志?
  • 你有~/.profile吗?
  • 当你:echo $PATH时,你会得到什么信息?
  • exportdeclare(没有选项)怎么样?
  • 您现在如何设置/导出所需的路径?

可能不是你想听到的,但我总是做一个全新安装而不是升级,因为担心这样的问题。这样做很可能会解决您的问题;他们都是万亿。我知道自从我搬到约塞米蒂以来,我从来没有遇到过任何问题,甚至是Homebrew的警告。