1

I'm having trouble getting PyQt4 to work with Python 3. I was able to get PyQt5 to work but all the tutorials seem to be using PyQt4 for web scraping so it looks like I'm forced to use PyQt4.

I've followed the directions at

http://pyqt.sourceforge.net/Docs/PyQt4/installation.html 

but whenever I get to the 'make install' part everything is copied over to my Python 2.7 directory where it works for Python 2.7.

I tried setting the destination directory

python3 configure.py -destdir/Users/ryan/anaconda/lib/python3.4/site-packages/

but it still installed to the python 2 dir. I also tried setting the python version

python3 configure.py --target-py-version 3.4

but it returns

configure.py: error: no such option: --target-py-version

1 Answer 1

1

You can use homebrew. Once brew installed, simply type the following commands in your terminal:

brew install sip --with-python3
brew install pyqt --with-python3
Sign up to request clarification or add additional context in comments.

2 Comments

I had Python 2.7/3.4/3.5 installed, after removing 3.4 I was finally able to get this working using what you suggested along with this post stackoverflow.com/questions/21711594/…
@RyanHalabi Good to hear. If you think the answer was usefull an upvote/accept would be nice

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.