Opened 4 years ago

Closed 3 years ago

#6669 closed defect (nonchimerax)

This copy of PyQt is unlicensed on macOS arm64

Reported by: Tom Goddard Owned by: Greg Couch
Priority: high Milestone:
Component: Platform Version:
Keywords: Cc: pett, Zach Pearson
Blocked By: Blocking: 4663
Notify when closed: Platform: all
Project: ChimeraX

Description

When I build ChimeraX on my Mac M1 computer with "make install-rbvi" to use the licensed wheels the build succeeds but it does not start. It gives the following error to the shell and exits:

This copy of PyQt is unlicensed.

Here is the successful PyQt install log output.

/Library/Developer/CommandLineTools/usr/bin/make -C PyQt install
/Library/Developer/CommandLineTools/usr/bin/make -f Makefile.wheel.qt6 VERSION=6.2 PYQT_MINOR_VERSION=3 QT_MINOR_VERSION=4 PYQTWE_MINOR_VERSION=1 PYQT_LICENSE=commercial install
rsync -av plato.cgl.ucsf.edu:/usr/local/src/PyQt6/6.2.3/PyQt6_commercial-6.2.3-cp36-abi3-macosx_10_14_universal2.whl .
receiving file list ... done
PyQt6_commercial-6.2.3-cp36-abi3-macosx_10_14_universal2.whl

sent 38 bytes  received 11414054 bytes  149203.82 bytes/sec
total size is 11411087  speedup is 1.00
rsync -av plato.cgl.ucsf.edu:/usr/local/src/PyQt6/6.2.1/PyQt6_WebEngine_commercial-6.2.1-cp36-abi3-macosx_10_14_universal2.whl .
receiving file list ... done
PyQt6_WebEngine_commercial-6.2.1-cp36-abi3-macosx_10_14_universal2.whl

sent 38 bytes  received 350636 bytes  140269.60 bytes/sec
total size is 350363  speedup is 1.00
/Users/goddard/ucsf/chimerax/build/bin/python3.9 -I -m pip --log pip.log install -U PyQt6-sip==13.2.1 PyQt6_commercial-6.2.3-cp36-abi3-macosx_10_14_universal2.whl PyQt6-Qt6==6.2.4 PyQt6_WebEngine_commercial-6.2.1-cp36-abi3-macosx_10_14_universal2.whl PyQt6-WebEngine-Qt6==6.2.4
Processing ./PyQt6_commercial-6.2.3-cp36-abi3-macosx_10_14_universal2.whl
Processing ./PyQt6_WebEngine_commercial-6.2.1-cp36-abi3-macosx_10_14_universal2.whl
Collecting PyQt6-sip==13.2.1
  Downloading PyQt6_sip-13.2.1.tar.gz (108 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Collecting PyQt6-Qt6==6.2.4
  Using cached PyQt6_Qt6-6.2.4-py3-none-macosx_11_0_arm64.whl (30.8 MB)
Collecting PyQt6-WebEngine-Qt6==6.2.4
  Using cached PyQt6_WebEngine_Qt6-6.2.4-py3-none-macosx_11_0_arm64.whl (73.9 MB)
Building wheels for collected packages: PyQt6-sip
  Building wheel for PyQt6-sip (pyproject.toml): started
  Building wheel for PyQt6-sip (pyproject.toml): finished with status 'done'
  Created wheel for PyQt6-sip: filename=PyQt6_sip-13.2.1-cp39-cp39-macosx_10_9_universal2.whl size=126634 sha256=d619c499b9863916c4184aaa8c11b21f49978fb367e6cbb707e9b8242f3e51de
  Stored in directory: /Users/goddard/Library/Caches/pip/wheels/01/f8/a4/d2c7f49d1c1c8f0b62234ae0d13856884e6cf0139d9ed38ede
Successfully built PyQt6-sip
Installing collected packages: PyQt6-sip, PyQt6-Qt6, PyQt6-WebEngine-Qt6, PyQt6-commercial, PyQt6-WebEngine-commercial
  WARNING: The scripts pylupdate6 and pyuic6 are installed in '/Users/goddard/ucsf/chimerax/build/Library/Frameworks/Python.framework/Versions/3.9/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed PyQt6-Qt6-6.2.4 PyQt6-WebEngine-Qt6-6.2.4 PyQt6-WebEngine-commercial-6.2.1 PyQt6-commercial-6.2.3 PyQt6-sip-13.2.1
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
You should consider upgrading via the '/Users/goddard/ucsf/chimerax/build/bin/python3.9 -m pip install --upgrade pip' command.

Change History (10)

comment:1 by Greg Couch, 4 years ago

Does the same problem occur with Qt 6.3 that is in the current chimerax repository?

comment:2 by Tom Goddard, 4 years ago

Yes same error with PyQt 6.3 wheels.

$ make PYQT_LICENSE=commercial  app-install
/Library/Developer/CommandLineTools/usr/bin/make -f Makefile.wheel.qt6 VERSION=6.3 PYQT_MINOR_VERSION=0 QT_MINOR_VERSION=0 PYQTWE_MINOR_VERSION=0 PYQT_LICENSE=commercial app-install
rsync -av plato.cgl.ucsf.edu:/usr/local/src/PyQt6/6.3.0/PyQt6_commercial-6.3.0-cp37-abi3-macosx_10_14_universal2.whl .
receiving file list ... done
PyQt6_commercial-6.3.0-cp37-abi3-macosx_10_14_universal2.whl

sent 38 bytes  received 11459830 bytes  4583947.20 bytes/sec
total size is 11456855  speedup is 1.00
rsync -av plato.cgl.ucsf.edu:/usr/local/src/PyQt6/6.3.0/PyQt6_WebEngine_commercial-6.3.0-cp37-abi3-macosx_10_14_universal2.whl .
receiving file list ... done
PyQt6_WebEngine_commercial-6.3.0-cp37-abi3-macosx_10_14_universal2.whl

sent 38 bytes  received 351550 bytes  140635.20 bytes/sec
total size is 351277  speedup is 1.00
/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/bin/python3.9 -I -m pip --log pip.log install -U PyQt6-sip==13.2.1 PyQt6_commercial-6.3.0-cp37-abi3-macosx_10_14_universal2.whl PyQt6-Qt6==6.3.0 PyQt6_WebEngine_commercial-6.3.0-cp37-abi3-macosx_10_14_universal2.whl PyQt6-WebEngine-Qt6==6.3.0
Processing ./PyQt6_commercial-6.3.0-cp37-abi3-macosx_10_14_universal2.whl
Processing ./PyQt6_WebEngine_commercial-6.3.0-cp37-abi3-macosx_10_14_universal2.whl
Requirement already satisfied: PyQt6-sip==13.2.1 in /Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (13.2.1)
Collecting PyQt6-Qt6==6.3.0
  Downloading PyQt6_Qt6-6.3.0-py3-none-macosx_11_0_arm64.whl (32.2 MB)
     |████████████████████████████████| 32.2 MB 870 kB/s            
Collecting PyQt6-WebEngine-Qt6==6.3.0
  Downloading PyQt6_WebEngine_Qt6-6.3.0-py3-none-macosx_11_0_arm64.whl (83.9 MB)
     |████████████████████████████████| 83.9 MB 862 kB/s            
Installing collected packages: PyQt6-Qt6, PyQt6-WebEngine-Qt6, PyQt6-commercial, PyQt6-WebEngine-commercial
  Attempting uninstall: PyQt6-Qt6
    Found existing installation: PyQt6-Qt6 6.2.4
    Uninstalling PyQt6-Qt6-6.2.4:
      Successfully uninstalled PyQt6-Qt6-6.2.4
  Attempting uninstall: PyQt6-WebEngine-Qt6
    Found existing installation: PyQt6-WebEngine-Qt6 6.2.4
    Uninstalling PyQt6-WebEngine-Qt6-6.2.4:
      Successfully uninstalled PyQt6-WebEngine-Qt6-6.2.4
  Attempting uninstall: PyQt6-commercial
    Found existing installation: PyQt6-commercial 6.2.3
    Uninstalling PyQt6-commercial-6.2.3:
      Successfully uninstalled PyQt6-commercial-6.2.3
  WARNING: The scripts pylupdate6 and pyuic6 are installed in '/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  Attempting uninstall: PyQt6-WebEngine-commercial
    Found existing installation: PyQt6-WebEngine-commercial 6.2.1
    Uninstalling PyQt6-WebEngine-commercial-6.2.1:
      Successfully uninstalled PyQt6-WebEngine-commercial-6.2.1
Successfully installed PyQt6-Qt6-6.3.0 PyQt6-WebEngine-Qt6-6.3.0 PyQt6-WebEngine-commercial-6.3.0 PyQt6-commercial-6.3.0
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available.
You should consider upgrading via the '/Users/goddard/ucsf/chimerax/ChimeraX.app/Contents/bin/python3.9 -m pip install --upgrade pip' command.
$ cx
This copy of PyQt is unlicensed.
$ 

comment:3 by Tom Goddard, 4 years ago

ChimeraX starts without this error when building on Intel Mac (descartes.cgl.ucsf.edu) running same macOS 12.3.1 with licensed wheels. So it seems to be specific to the Arm64 Mac build.

comment:4 by Tom Goddard, 3 years ago

Priority: moderatehigh

Building Mac arm64 ChimeraX

make install PYQT_LICENSE=commercial >& make.out

with PyQt 6.3.1 continues to generate this error and the build fails building the sphinx documentation and the app does not start

$ ~/ucsf/chimerax/ChimeraX.app/Contents/MacOS/ChimeraX
This copy of PyQt is unlicensed.

Apparently the license has not been included in the PyQt6 wheels on plato in the right way.

comment:5 by Tom Goddard, 3 years ago

Here is a post discussing a similar problem.

https://serveanswer.com/issue/generate-commercial-wheels-for-pyqt

comment:6 by Tom Goddard, 3 years ago

The licensed PyQt6 wheels are on plato in /usr/local/src/PyQt6/6.3.1.

I think Greg is the only one who knows how to make these licensed wheels, although there are probably instructions online for how it is done.

comment:7 by Tom Goddard, 3 years ago

Blocking: 4663

comment:8 by Tom Goddard, 3 years ago

I downloaded and tested the PyQt 6.3.1 commercial Mac wheels with the standard Python.org 3.9.11 python following the Riverbank instructions

https://www.riverbankcomputing.com/static/Docs/PyQt6/installation.html#installing-the-commercial-version

and got the same error. So I sent the following email to Riverbank support.

From: Tom Goddard 
Subject: Commercial PyQt6 gives "This copy of PyQt is unlicensed" on Mac M1
Date: July 1, 2022 at 11:28:52 AM PDT
To: support@riverbankcomputing.com

I am trying to use my commercially licensed PyQt6 on a Mac M1 machine.  The commercial wheels from Riverbank install without errors but then importing gives the error "This copy of PyQt is unlicensed."  The exact same process on an Intel Mac works and does not give any error when PyQt6 is used.  How do I get the commercial wheels to work on Mac M1?

 Thanks for your help.  I have been using commercial PyQt for 6 years and appreciate your effort.

	Tom Goddard
	License ID: redacted
	UC San Francisco developer
	

I am using these commercial wheels from Riverbank

$ ls -l *.whl
-rw-r--r--@ 1 goddard  staff    354508 Jul  1 10:38 PyQt6_WebEngine_commercial-6.3.1-cp37-abi3-macosx_10_14_universal2.whl
-rw-r--r--@ 1 goddard  staff  11507879 Jul  1 10:38 PyQt6_commercial-6.3.1-cp37-abi3-macosx_10_14_universal2.whl

Here is the installation output on Mac M1 using the standard python 3.9.11 distribution from Python.org

$ /usr/local/bin/python3 -m pip install --no-cache-dir PyQt6_commercial-6.3.1-cp37-abi3-macosx_10_14_universal2.whl PyQt6_WebEngine_commercial-6.3.1-cp37-abi3-macosx_10_14_universal2.whl
Processing ./PyQt6_commercial-6.3.1-cp37-abi3-macosx_10_14_universal2.whl
Processing ./PyQt6_WebEngine_commercial-6.3.1-cp37-abi3-macosx_10_14_universal2.whl
Collecting PyQt6-sip<14,>=13.4
 Downloading PyQt6_sip-13.4.0.tar.gz (111 kB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 111.2/111.2 kB 5.2 MB/s eta 0:00:00

 Installing build dependencies ... done
 Getting requirements to build wheel ... done
 Preparing metadata (pyproject.toml) ... done
Collecting PyQt6-Qt6>=6.3.0
 Downloading PyQt6_Qt6-6.3.1-py3-none-macosx_11_0_arm64.whl (32.5 MB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 32.5/32.5 MB 25.4 MB/s eta 0:00:00

Requirement already satisfied: PyQt6-WebEngine-Qt6>=6.3.0 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from PyQt6-WebEngine-commercial==6.3.1) (6.3.1)
Building wheels for collected packages: PyQt6-sip
 Building wheel for PyQt6-sip (pyproject.toml) ... done
 Created wheel for PyQt6-sip: filename=PyQt6_sip-13.4.0-cp39-cp39-macosx_10_9_universal2.whl size=131793 sha256=88f40b687d303799af75fc52281afab5634d0638d798825282c71029667f8705
 Stored in directory: /private/var/folders/xm/39nw5kqs2z14whlsf6ks_bcr0000gn/T/pip-ephem-wheel-cache-npbqkz87/wheels/d5/e0/df/e046a831f7c5da46ac9eaa5f15b3372bc4982250d2a373ae7e
Successfully built PyQt6-sip
Installing collected packages: PyQt6-Qt6, PyQt6-sip, PyQt6-commercial, PyQt6-WebEngine-commercial
 WARNING: The scripts pylupdate6 and pyuic6 are installed in '/Library/Frameworks/Python.framework/Versions/3.9/bin' which is not on PATH.
 Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed PyQt6-Qt6-6.3.1 PyQt6-WebEngine-commercial-6.3.1 PyQt6-commercial-6.3.1 PyQt6-sip-13.4.0


$ /usr/local/bin/python3
Python 3.9.11 (v3.9.11:2de452f8bf, Mar 16 2022, 10:44:40) 
[Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
from PyQt6 import QtGui
This copy of PyQt is unlicensed.
$

comment:9 by Greg Couch, 3 years ago

The licensed wheels, that we used to build, are for bundling the Qt binaries so there is only one wheel. Now, we're using the PyQt6-Qt6 wheel for the Qt binaries from PyPi, and that allows us to use the PyQt6_commercial wheel, that we download, unaltered.

comment:10 by Greg Couch, 3 years ago

Resolution: nonchimerax
Status: assignedclosed

Fixed by Riverbank after prodding from Tom Goddard.

Note: See TracTickets for help on using tickets.