PaulBarr
PaulBarr

Reputation: 949

How to change qmake when upgrading to qt5 for pyqt5

I am trying to install Pyqt but I am having significant issues getting all the seperate installation processes to work in sync. I have looked online but I can't find anything to help in my specific situation.

So far I have downloaded and built Sip4.16.7. I saved the file to a random location on my directory and ran the configure file, it then installed the module in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages and seemed to work.

I then downloaded the latest version of Qt5.2 and installed it using the installer. The files are stored in /users/MyUsername/Qt

I then installed PyQt5.4.1 and tried to run the configure file but I obviously have an older version of qmake on my system as I get an error of Error: PyQt5 requires Qt v5.0 or later. You seem to be using v4.7.4. Use the --qmake flag to specify the correct version of qmake. This is confirmed by typing qmake -v in the terminal and I get the output of QMake version 2.01a Using Qt version 4.7.4 in /opt/anaconda1anaconda2anaconda3/lib. I have scoured the internet and I can't work out how to tell whether I have a new qmake for the Qt5.2 or If I have to make it. And I have no idea how to get set the right Qtmake directory for the new PyQt configure file.

I apologise for the very specific and confused question but I am totally lost at the moment. As an additional question When you download the PyQt and SIP files should they be saved in specific directories relative to each other?

Upvotes: 1

Views: 790

Answers (1)

PaulBarr
PaulBarr

Reputation: 949

To follow the entire discussion for how I answered this refer to https://forum.qt.io/topic/53035/installation-problems-with-pyqt-locating-old-version-of-qmake/37

There were 2 main problems:

1) The --qmake=/Users/MyUsername/Qt/5.4/ios/bin/qmake was directed to the iOS qmake which requires a subscription to apple developers program. using the --verbose option returned Check dependencies Code Sign error: No code signing identities found: No valid signing identities (i.e. certificate and private key pair) matching the team ID “(null)” were found. CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 8.1'

The solution to this was to refer qmake to the clang-64 version to allow development on OS X not iOS.

2) I had saved the PyQt directory in my google drive and therefore there was a space in the file name. Therefore when I referred to the qmake in the clang-64 directory I got the error of ```clang: error: no such file or directory: Drive/Personal/Code/PyQT/PyQt-gpl-5.4.1 (when using --verbose) So I had to move the PyQT file to outside my google drive and rerun, and it worked fine.

Upvotes: 1

Related Questions