Autodesk 3ds Max ships with a pre-built version of PySide 2.0, and is the preferred library for using QT with Python in 3ds Max (see Creating Python Uis). You may install other CPython extension libraries as well. However, while every effort has been made to ensure that CPython extension libraries such as PyQt, SciPy, NumPy, PIL, and so forth work with Python in 3ds Max, Autodesk does not provide technical support for them.
The official binaries of Python 2.7 is compiled with VC9.0, while 3ds Max 2020 (and its version of 3dsmaxpy.exe) is compiled with VC15. This means pre-compiled extension libraries Python are not binary compatible do not work with 3ds Max, and you need to recompile CPython extension libraries for use with Python in 3ds Max with the more recent compiler. See the SDK Requirements topic in the 3ds Max Developer's Guide for specifics about the required Visual Studio and Windows toolset versions. Compiled extension libraries must then be placed at a location that can be found by Python. Python uses the list of directories in the sys.path global variable to find the location of imported Python scripts and extension modules.
Pip is a package management system for Python. It is useful for managing additional Python modules, including managing building modules from source (for example, NumPy). With Python 2, you will need to obtain the source and re-build the binaries, replacing the ones installed by pip. By default, pip will try to use pre-built binaries. You can force pip to build from source with the --no-binary flag, and specifying a required version (see example below).
Visual Studio 2017 (with VC15.0) must be installed to build libraries from source.
To install pip:
Note: Many CPython libraries have additional requirements. NumPy, for example, also requires a Fortran77 compiler, and has several additional dependencies. The Pillow example above requires Zlib and libjpeg (at minimum) be present on the system. Check the specific library's project page for information about any dependencies you will need to obtain.
Note: Use the --no-cache-dir option if Python is installed on your computer.
Note: By default, 3dsmaxpy.exe handles the case where there is a space in the path of the 3ds Max python install. You can disable this feature by setting an environment variable, \__disable_space_handling to FALSE.