2

When updating Homebrew I got the following warning:

==> Pouring py2cairo-1.15.4.high_sierra.bottle.tar.gz
==> Caveats
Python modules have been installed and Homebrew's site-packages is not
in your Python sys.path, so you will not be able to import the modules
this formula installed. If you plan to develop with these modules,
please run:
  mkdir -p /Users/qazwsx/Library/Python/2.7/lib/python/site-packages
  echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/qazwsx/Library/Python/2.7/lib/python/site-packages/homebrew.pth

Should I do this? It seems to modify the Python installation that came with macOS, is doing that recommended normally?

When developing Java programs, I sometimes use virtualenv.

ipatch
  • 3,933
  • 8
  • 60
  • 99
qazwsx
  • 25,536
  • 30
  • 72
  • 106
  • It ***does not*** modify the Python installation that came with macOS. What it does is it adds the system's `site-packages` folder to the list of searched directories by your homebrew's python installation. Your new python installation will point to the system's package directory. – Abdou Nov 09 '17 at 17:54
  • So it's mostly safe and desirable, right? – qazwsx Nov 09 '17 at 18:16
  • Mostly safe, but desirable is up to you. I like to separate python installations to make sure that the removal of one does not cause issues with another. But given that the system's python version is ***never*** to be deleted, I guess this is fine. – Abdou Nov 09 '17 at 18:22

0 Answers0