LoginSignup
1
2

More than 1 year has passed since last update.

HomebrewでPyenvを入れているとbrew doctorでWarningが出る

Last updated at Posted at 2022-01-03

HomebrewでPyenvを入れていると...

ターミナルでbrew doctorと打つと

$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

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 which 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/username/.pyenv/shims/python2-config
  /Users/username/.pyenv/shims/python3.7-config
  /Users/username/.pyenv/shims/python2.7-config
  /Users/username/.pyenv/shims/python3.10-config
  /Users/username/.pyenv/shims/python3.7m-config
  /Users/username/.pyenv/shims/python-config
  /Users/username/.pyenv/shims/python3-config

というようなエラーが出る.これが邪魔なので自分の使っているシェルに応じて,.bashrc.zshrcに以下を記載する.

alias brew='env PATH="${PATH//$(pyenv root)\/shims:/}" brew'

するとスッキリ.

$ brew doctor
Your system is ready to brew.

参考

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2