Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-1760

Installing with custom Python crashes on macOS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.3.0
    • 6.3, 6.4, 6.2.2
    • Build System
    • None
    • 981ffb3459 (pyside/pyside-setup/dev) 981ffb3459 (pyside/tqtc-pyside-setup/dev) 0258f4d277 (pyside/pyside-setup/6.2) 0258f4d277 (pyside/tqtc-pyside-setup/6.2) 981ffb3459 (pyside/tqtc-pyside-setup/tqtc/dev) 0258f4d277 (pyside/pyside-setup/6.2.3)

    Description

      Problem:

      When building PySide with any Python version, may it be a homebrew version or an own build, this works as expected.
      When installing with an own Python 3.7 - 3.10 build, this gives a crash of

      ImportError: cannot import name 'install_scripts' from 'setuptools._distutils.command' (/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/_distutils/command/__init__.py)
      

      Longer investigation showed that the move from distutils to setuptools caused this error: 95a5bb9dd3b5d3fa86f2ed0868e2b821256a6028

      It turned out that the current homebrew Python 3.9 installation does not have this problem, also not the PyPy 3.7 installation worked fine.

      Solution:

      When pre-loading the import of setuptools.command.install_scripts, the problem vanishes from all versions, completely.
      It is unknown if this is a macOS-only problem.

      Why was this not recognized earlier?

      The recommendation for PySide is to use a virtualenv install of Python to build and install it. This has the side effect that the reported problem does not happen. My habit instead is to use plain, unmodified Python builds

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ctismer Christian Tismer
            ctismer Christian Tismer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes