PyQt4 and scip for python on Mac OS Sierra



  • Hello,

    I am currently failing to import PyQt4 and scip into python on my MacBook (OS Sierra), both of which I need to run a different program. I believe this is due to unsuccessful installation of PyQt4; I have already successfully downloaded SIP using homebrew (it tells me, however, that it is not yet 'linked' and I do not know what that means).

    Also, I am not sure what scip is - is it something that I need to download separately?

    My main problem appears to be executing the function 'python configure-ng.py' to start building PyQt4. This function, along with "configure.py" are in my directory "/Users/devineurons/anaconda/lib/PyQt-mac-gpl-4.11.4." When I set this as my directory in terminal and execute 'python configure-ng.py,' I receive the following error:

    //Querying qmake about your Qt installation...
    Determining the details of your Qt installation...
    Error: Failed to determine the detail of your Qt installation. Try again using
    the --verbose flag to see more detail about the problem.
    

    After using the --verbose function with the command, I receive the following:

    //Querying qmake about your Qt installation...
    Determining the details of your Qt installation...
    /Users/devineurons/anaconda/bin/qmake -spec macx-g++ -o qtdetail.mk qtdetail.pro
    make -f qtdetail.mk
    g++ -c -pipe -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_SHARED -I../../mkspecs/macx-g++ -I. -I../../include/qt/QtCore -I../../include/qt -I. -o qtdetail.o qtdetail.cpp
    g++ -headerpad_max_install_names -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -o qtdetail.app/Contents/MacOS/qtdetail qtdetail.o    -L/Users/devineurons/anaconda/lib -lQtCore -L/Users/devineurons/anaconda/lib 
    clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9
    Undefined symbols for architecture x86_64:
      "__Unwind_Resume", referenced from:
          _main in qtdetail.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make: *** [qtdetail.app/Contents/MacOS/qtdetail] Error 1
    Error: Failed to determine the detail of your Qt installation. Try again using
    the --verbose flag to see more detail about the problem.
    

    I have also downloaded Qt 4.8.7-4 using anaconda, but I previously had version 5.7. I'm not sure if it worked completely because I still have some folders related to v5.7 in my Qt folder.

    I'm not sure where the problem is at (or if I'm missing something in python or another program) because I am very new to this. I hope someone can help!


  • Lifetime Qt Champion

    Hi,

    To avoid losing more time, IIRC conda already provides PyQt4 so you don't have to build it yourself.



  • @SGaist After reading your response, I executed the following in terminal:

    conda install -c anaconda pyqt=4.11.4
    

    This supposedly "worked"

    Fetching package metadata .........
    Solving package specifications: ..........
    
    Package plan for installation in environment /Users/devineurons/anaconda:
    
    The following packages will be downloaded:
    
        package                    |            build
        ---------------------------|-----------------
        conda-env-2.6.0            |                0          601 B  anaconda
        conda-4.2.13               |           py35_0         389 KB  anaconda
        pyqt-4.11.4                |           py35_4         4.0 MB  anaconda
        ------------------------------------------------------------
                                               Total:         4.4 MB
    
    The following packages will be SUPERCEDED by a higher-priority channel:
    
        conda:     4.2.13-py35_0 --> 4.2.13-py35_0 anaconda
        conda-env: 2.6.0-0       --> 2.6.0-0       anaconda
        pyqt:      4.11.4-py35_4 --> 4.11.4-py35_4 anaconda
    
    Proceed ([y]/n)? y
    
    Pruning fetched packages from the cache ...
    Fetching packages ...
    conda-env-2.6. 100% |################################| Time: 0:00:00  66.93 kB/s
    conda-4.2.13-p 100% |################################| Time: 0:00:00 426.41 kB/s
    pyqt-4.11.4-py 100% |################################| Time: 0:00:03   1.36 MB/s
    Extracting packages ...
    [      COMPLETE      ]|###################################################| 100%
    Unlinking packages ...
    [      COMPLETE      ]|###################################################| 100%
    Linking packages ...
    [      COMPLETE      ]|###################################################| 100%
    

    but I am still unable to import PyQt4 into python i.e:

    Devins-MacBook-Pro:PyQt-mac-gpl-4.11.4 devineurons$ python
    Python 3.5.2 |Anaconda 4.2.0 (x86_64)| (default, Jul  2 2016, 17:52:12) 
    [GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import pyqt4
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ImportError: No module named 'pyqt4'
    

    I've also tried to import with a different name (i.e. pyqt4.11.4, 4.11.4-py35_4, etc.) with no success.


  • Lifetime Qt Champion

    The module name is PyQt4 case sensitive.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.