Homebrew / legacy-homebrew

💀 The former home of Homebrew/homebrew (deprecated)
https://brew.sh
26.98k stars 11.35k forks source link

PyQT 4.9.1 formula deletes site-packages #10297

Closed devonbryant closed 12 years ago

devonbryant commented 12 years ago

After running an upgrade on the latest PyQT (4.9.1), it removed my previous "/usr/local/lib/python2.7/site-packages" directory and created a symlink to "site-packages -> ../../Cellar/pyqt/4.9.1/lib/python2.7/site-packages", which only contains the PyQt4 package.

Sharpie commented 12 years ago

Mmm... that is odd and disturbing. This is probably a result of 2bf9bba, but I ran that code on my own machine before pushing it and nothing of the sort happened.

Was your site-packages directory empty prior to installing PyQt?

2bits commented 12 years ago

pyqt doesn't work for me. Here is the error output

$ find /usr/local -name "sipconfig*"
/usr/local/Cellar/sip/4.13.2/lib/python2.7/site-packages/sipconfig.py
/usr/local/lib/python2.7/site-packages/sipconfig.py
devonbryant commented 12 years ago

I'm not sure how this happened and have not been able to re-produce it. I just removed and re-installed python/pyqt/sip and everything installed correctly this time.

Sharpie commented 12 years ago

@2bits I was having strange issues due to *.pyc files being left behind in the old SIP and PyQt link destination: HOMEBREW_PREFIX/lib/python. I would suggest cleaning that directory out and taking it off the PYTHONPATH.

2bits commented 12 years ago

I noticed Devon said he installed Python. So I tried that, and pyqt installs correctly. It fails for me otherwise, even if I do a

brew rm -f `brew list`

and remove everything in /usr/local/lib/* then rebrew.

Sharpie commented 12 years ago

I noticed Devon said he installed Python. So I tried that, and pyqt installs correctly. It fails for me otherwise

And is the following directory on your PYTHONPATH (as per the sip caveats)?

/usr/local/lib/python2.7/sitepackages

Homebrew's Python 2.7 knows to look in /usr/local/lib/python2.7/site-packages. The system Python has to be told where to look.

2bits commented 12 years ago

Oops. My .profile had the old PYTHONPATH. Thanks for figuring that out for me.

adamv commented 12 years ago

Maybe we need to audit PYTHONPATH too in brew doctor.