Brew doctor warnings about python 3.6 site packages and sitecustomize

(Luis Puerto) #1


I’ve got a couple of warnings on brew doctor. First one I really don’t know how to fix and the second one I’ve run the command but still arising.

brew doctor                                                                         
'import sitecustomize' failed; use -v for traceback
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: Your default Python does not recognize the Homebrew site-packages
directory as a special site-packages directory, which means that .pth
files will not be followed. This means you will not be able to import
some modules after installing them with Homebrew, like wxpython. To fix
this for the current user, you can run:
  mkdir -p /Users/lpuerto/Library/Python/2.7/lib/python/site-packages
  echo 'import site; site.addsitedir("/usr/local/lib/python3.6/site-packages")' >> /Users/lpuerto/Library/Python/2.7/lib/python/site-packages/homebrew.pth

Can anyone give me any help?

Thanks in advance.

PS/ I was thinking to post this on brew-core issues, but it seemed more appropriate here.

(Mike McQuaid) #2

Firstly, please note this. You can just ignore this. That said this particular message is nonsensical so I’ve opened a PR to remove it:

(Luis Puerto) #3

Hi Mike!

Thanks! Yes, I know that I could just ignore, but this one called my attention.

That means I don’t need to have homebrew.pth with the line import site; site.addsitedir("/usr/local/lib/python3.6/site-packages")?

Thanks again!

(Mike McQuaid) #4

I have removed the warning so you may want or need to but we no longer make that recommendation.

(Luis Puerto) #5

I just realize that in the warning it was talking about wxpython.

I just run brew test $(brew list) and among other several errors I got:

Testing wxpython
==> python -c 'import wx ; print wx.version()'
  File "<string>", line 1
    import wx ; print wx.version()
SyntaxError: invalid syntax
Error: wxpython: failed
<0> expected but was

It’s the first time I run brew test $(brew list) so I don’t know if that error was there before.

Do you think it’s related?

I have like 5 or 6 more errors. Do you think I should post it here or as issues in GitHub?

(Mike McQuaid) #6

Unless it’s causing issues for your usage of python: again: ignore it please.

(Luis Puerto) #7

To be totally honest… I don’t know if my python is working properly… I’ve been trying to build QGIS3 and I’ve failed miserably and my QGIS2 install also failed –before I tried to compile QGIS3– and I haven’t been able to build QGIS2 again.

Right now I’m building QGIS2, since I reinstalled gdal2. But QGIS3 throw me an error about python.