Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Mach-o, but wrong architecture
Forum Update on Monday, May 27th 2025

Mach-o, but wrong architecture

Scheduled Pinned Locked Moved Installation and Deployment
4 Posts 2 Posters 2.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lewisl
    wrote on last edited by
    #1

    This appears to be a constant refrain.

    Attempting to run a simple tutorial app:

    import sys
    import PySide.QtCore
    import PySide.QtGui

    app = PySide.QtGui.QApplication(sys.argv)
    label = PySide.QtGui.Qlabel("Hello World")
    label.show()
    app.exec_()
    sys.exit()

    The import fails as follows:

    Traceback (most recent call last):
    File "/Users/lewislevin/Dropbox/Python-code/QT-hello-world/Hello-world.py", line 4, in <module>
    import PySide.QtCore
    ImportError: dlopen(/Library/Python/2.7/site-packages/PySide/QtCore.so, 2): no suitable image found. Did find:
    /Library/Python/2.7/site-packages/PySide/QtCore.so: mach-o, but wrong architecture

    I initially installed PySide with pip and ran the post install script. Import works and the version can be displayed with the trivial test.

    But, it produced same message. I uninstalled with pip (which doesn't really work of course as PySide is scattered to many places. generally, you should have a reliable uninstaller. Perish the thought that someone might ever want to uninstall...)

    Then, I used brew and to install a build Pyside, which installed a new copy of QT. Everything is at version 4.8.6. The trivial test works:
    Python 2.7.8 (v2.7.8:ee879c0ffa11, Jun 29 2014, 21:07:35)
    [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.

    import PySide
    import PySide.QtCore
    print (PySide.QtCore.version)
    4.8.6

    But, there is this mach-o incompatibility. This is frustrating.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      You might be mixing 32bit and 64bit libraries. You can check that with the file command

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • L Offline
        L Offline
        lewisl
        wrote on last edited by
        #3

        How do you run that command?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @file /path/to/the_file_you_want_to_check@

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved