This post is an update about this great post :

Written by Cyrille Fauvel – Autodesk Developer Network (April 2013) 
Updated by Lanh Hong and Chengxi Li – Autodesk Developer Network (January 2019) 


Setting up your environment:

      1. Follow the official instruction to prepare your Environment > Autodesk Developer Documentation
      2. Download SIP and PyQt source. I downloaded ‘sip-4.19.13’ and ‘PyQt5_gpl-5.11.3’. Unzip them into one folder.
      3. Put in the same folder the script (only the script on the ‘win’ folder) available on Github
      4. Backup your qt.conf  located on  C:\Program Files\Autodesk\Maya2019\bin and replace with the following code:
      5. Unzip  the package C:\Program Files\Autodesk\Maya2019\include\ in C:\Program Files\Autodesk\Maya2019\include\Qt
      6. Unzip the package C:\Program Files\Autodesk\Maya2019\include\ in C:\Program Files\Autodesk\Maya2019\mkspecs
      7. Modify the C:\Program Files\Autodesk\Maya2019\mkspecs\mkspecs\common\msvc-destop.conf. Find QMAKE_LIBS_QT_ENTRY and make sure is -lqtmain -lshell32.
      8. Rename the folder inside C:\Program Files\Autodesk\Maya2019\include\Qt\qtnfc to qtnfc.disabled
      9. Install Visual Studio 2017 Community > Download
      10. Install the Python package manager Pip by execute with mayapy.exe this py file get-pip using the command prompt as Administrator C:\Program Files\Autodesk\Maya2019\bin\mayapy.exe youPath\
      11. Install using pip the setuptools and enum34 with the following command
        C:\Program Files\Autodesk\Maya2019\bin\mayapy.exe -m pip install setuptools 
        C:\Program Files\Autodesk\Maya2019\bin\mayapy.exe -m pip install enum34
      12. Run the following scripts (the previous downloaded from github) lauching them with the VS2017 x64 Native Tools Command Prompt (as Administrator):
          1. setup.bat
          2. sip.bat
          3. pyqt.bat
      13. At this point you’re done! The last thing to do is to test it! SO launch Maya and try the following code :
        import sys
        from PyQt5.QtWidgets import (QWidget, QToolTip, QPushButton)
        from PyQt5.QtGui import QFont    
        class Example(QWidget):
            def __init__(self):
            def initUI(self):
                QToolTip.setFont(QFont('SansSerif', 10))
                self.setToolTip('This is a <b>QWidget</b> widget')
                btn = QPushButton('Button', self)
                btn.setToolTip('This is a <b>QPushButton</b> widget')
                btn.move(50, 50)
                self.setGeometry(300, 300, 300, 200)
        ex = Example()


      P.S.: Remember that you must to restore the qt.conf or you get an error when Maya try to load the plugin .

      Hope all that’s info are usefull for others.Cheers

Share Post