ArcGIS Pro: Add Python for Qt (5.11) to the Python repository

639
3
06-28-2018 04:31 AM
Status: Implemented
Labels (1)
ChrisHills
Occasional Contributor

The currently available Qt packages for Python are quite old, and do not included the new "Python for Qt" which uses Pyside2 and is available under the LGPL license.

The page Qt for Python 5.11 released - Qt Blog  has some more information.

3 Comments
ShaunWalbridge

Chris,

Thanks for the suggestion. We generally only create specialized packages that have some direct interaction with the components we ship with ArcGIS Pro. Most packages that are listed are maintained upstream by either Anaconda, or the community driven conda-forge project. Since you wrote, Anaconda has updated the base Qt package available to 5.9 which is fairly recent and the latest LTS release. Qt is somewhat tricky because it is depended on by so many downstream packages, many of which have version limitations themselves. Packages like Spyder, Matplotlib, PySide and many others rely on Qt, making version changes more work than an average package. From what I've read, Anaconda will continue to work on supporting LTS releases, which may lag the latest and greatest Qt have produced.

That said, you have a few of options today:

1. Check out the conda-forge work to get 5.11 into a conda package, such as this thread:

  [just testing] Qt5.11 by hmaarrfk · Pull Request #75 · conda-forge/qt-feedstock · GitHub 

2. You can install it today! Just not through the backstage, and you shouldn't do this in an environment that has a conda installed version of Qt. Do do so, here's a quick starter, after you've selected the "Python Command Prompt" menu item (here I made a Python 3.6 environment):

conda create --clone arcgispro-py3 --name arcgispro-qt5
activate arcgispro-qt5
pip install pyside2‍‍‍‍‍‍‍‍

This will get you an environment with ArcGIS Pro, and Qt5.11 via PySide2. The DLLs and executables for Qt5 will end up in the Lib\site-packages\PySide2 directory, and you should be able to access them from there in that environment.

3. Ask that the Qt developers help support a conda package -- a complex dependency like Qt is better suited to a conda package than the wheel file they currently distribute with PyPI.

Hope that helps,
Shaun

ChrisHills

Thank you for the long and detailed reply! I will petition Qt to support a conda package instead of wheel.

Chris

ShaunWalbridge
Status changed to: Implemented

Qt5 Python packages are available through conda-forge and other channels now.