Python Support

Compose supports Python 3.8 as a scripting language.

Supported Packages - Windows

absl-py                       1.0.0
adodbapi                      2.6.2.0
aiohttp                       3.8.1
aiosignal                     1.3.1
alabaster                     0.7.12
alembic                       1.9.4
anyio                         3.6.2
apipkg                        2.1.0
appdirs                       1.4.4
argon2-cffi                   21.1.0
asgiref                       3.6.0
asn1crypto                    1.5.0
astroid                       2.10.0
astunparse                    1.6.3
async-generator               1.10
async-timeout                 4.0.2
atomicwrites                  1.3.0
attrs                         21.4.0
Automat                       20.2.0
Babel                         2.9.1
backcall                      0.2.0
bcrypt                        3.2.0
beautifulsoup4                4.10.0
bleach                        4.1.0
boto3                         1.21.15
botocore                      1.24.46
bson                          0.5.10
CacheControl                  0.12.10
cachetools                    5.3.0
cachy                         0.3.0
certifi                       2021.10.8
cffi                          1.15.0
chardet                       4.0.0
charset-normalizer            2.0.12
cleo                          0.8.1
click                         8.1.3
clikit                        0.6.2
cloudpickle                   2.0.0
colorama                      0.4.3
commonmark                    0.9.1
configparser                  5.0.2
constantly                    15.1.0
contextlib2                   21.6.0
cov-core                      1.15.0
coverage                      6.3.2
cppy                          1.1.0
crashtest                     0.3.1
cryptography                  3.3.2
curio                         1.6
cycler                        0.11.0
Cython                        0.29.28
cytoolz                       0.11.2
dask                          2022.2.1
databricks-cli                0.17.0
debugpy                       1.5.1
decorator                     5.1.1
defusedxml                    0.7.1
deprecation                   2.1.0
distlib                       0.3.4
dnspython                     2.2.1
docker                        5.0.0
docopt                        0.6.2
docutils                      0.17.1
editables                     0.3
email-validator               1.3.1
entrypoints                   0.3
et-xmlfile                    1.1.0
execnet                       1.9.0
ezdxf                         0.17.2
falcon                        3.0.0
falcon-jsonify                1.2
fastapi                       0.76.0
filelock                      3.6.0
flake8                        4.0.1
Flask                         2.1.3
flatbuffers                   20230307191353
flit                          3.2.0
flit-core                     3.2.0
frozenlist                    1.3.3
fsspec                        2022.5.0
gast                          0.5.3
gevent                        1.4.0
gitdb                         4.0.10
GitPython                     3.1.27
glob2                         0.7
google-auth                   2.6.6
google-auth-oauthlib          0.5.1
google-pasta                  0.2.0
graphviz                      0.19.1
greenlet                      1.1.2
grpcio                        1.42.0
gunicorn                      20.1.0
h11                           0.12.0
h2                            4.1.0
h5py                          3.2.1
hatchling                     1.5.0
hdbscan                       0.8.27
hpack                         4.0.0
html5lib                      1.1
httpcore                      0.14.7
httpx                         0.22.0
hyperframe                    6.0.1
hyperlink                     21.0.0
hypothesis                    6.39.3
idna                          3.3
imageio                       2.16.1
imagesize                     1.3.0
importlib-metadata            4.11.3
importlib-resources           5.8.0
imutils                       0.5.4
incremental                   21.3.0
iniconfig                     1.1.1
invoke                        1.7.1
ipykernel                     6.15.1
ipyparallel                   6.2.4
ipython                       7.25.0
ipython-genutils              0.2.0
ipywidgets                    7.6.5
isort                         5.7.0
itsdangerous                  2.1.2
jdcal                         1.4.1
jedi                          0.18.1
jeepney                       0.6.0
Jinja2                        3.0.3
jmespath                      0.10.0
joblib                        1.1.0
jsondiff                      2.0.0
jsonpath-ng                   1.5.3
jsonschema                    4.4.0
jupyter                       1.0.0
jupyter-client                7.0.6
jupyter-console               6.4.4
jupyter-core                  4.9.2
jupyter-packaging             0.11.0
keras                         2.7.0
Keras-Preprocessing           1.1.2
keyring                       21.5.0
kiwisolver                    1.3.2
lazy-object-proxy             1.7.1
locket                        1.0.0
lxml                          4.6.3
m2r                           0.3.1
Mako                          1.2.0
Markdown                      3.3.6
MarkupSafe                    2.1.0
matplotlib                    3.3.0
matplotlib-inline             0.1.3
mccabe                        0.6.1
metakernel                    0.27.5
mflow                         0.0.4
mglearn                       0.1.9
mistune                       0.8.4
mlflow                        1.24.0
mock                          4.0.3
more-itertools                8.12.0
mpmath                        1.2.1
msgpack                       1.0.3
multidict                     6.0.4
multipledispatch              0.6.0
nats-py                       2.1.7
nbconvert                     5.6.1
nbformat                      5.2.0
nest-asyncio                  1.5.5
networkx                      2.7.1
nltk                          3.7
nose2                         0.11.0
notebook                      6.4.7
numpy                         1.22.1
numpydoc                      1.1.0
oauthlib                      3.2.0
olefile                       0.46
openpyxl                      3.0.9
opt-einsum                    3.3.0
outcome                       1.2.0
packaging                     20.9
paho-mqtt                     1.6.1
panci                         0.0.2
pandas                        1.3.1
pandocfilters                 1.5.0
paramiko                      2.7.1
parso                         0.8.3
partd                         1.2.0
pastel                        0.2.1
pathlib2                      2.3.7.post1
pathspec                      0.11.0
pbr                           5.8.1
pexpect                       4.8.0
pickleshare                   0.7.5
Pillow                        9.0.1
pip                           21.1.3
pkgconfig                     1.5.5
pkginfo                       1.8.2
platformdirs                  2.5.1
plotly                        4.14.3
pluggy                        1.0.0
ply                           3.11
poetry                        1.1.13
poetry-core                   1.0.8
portalocker                   2.4.0
portpicker                    1.3.9
prettytable                   3.1.1
prometheus-client             0.12.0
prometheus-flask-exporter     0.18.7
prompt-toolkit                3.0.28
protobuf                      3.19.2
psutil                        5.9.0
py                            1.11.0
py-make                       0.1.1
pyasn1                        0.4.8
pyasn1-modules                0.2.8
pybind11                      2.10.3
pycodestyle                   2.8.0
pycparser                     2.21
pydantic                      1.9.2
pydash                        6.0.2
pyDOE                         0.3.8
pyDOE2                        1.3.0
pydot                         1.4.2
pyflakes                      2.4.0
Pygments                      2.11.2
PyHamcrest                    2.0.3
PyJWT                         2.4.0
pylev                         1.4.0
pylint                        2.6.0
PyNaCl                        1.4.0
pyodbc                        4.0.32
pyparsing                     3.0.7
pypiserver                    1.4.2
pypiwin32                     223
pyrsistent                    0.18.1
pytest                        7.0.1
pytest-cov                    3.0.0
pytest-forked                 1.6.0
pytest-localserver            0.5.1.post0
pytest-reportlog              0.2.1
pytest-runner                 6.0.0
pytest-timeout                2.1.0
pytest-xdist                  2.4.0
python-dateutil               2.8.2
python-docx                   0.8.11
python-mimeparse              1.6.0
python-multipart              0.0.5
python-pptx                   0.6.18
pytoml                        0.1.21
pyttk                         0.3.2
pytz                          2021.3
PyWavelets                    1.1.1
pywin32                       301
pywin32-ctypes                0.2.0
pywinpty                      0.5.7
PyYAML                        6.0
pyzmq                         22.0.3
qtconsole                     5.1.1
QtPy                          1.11.2
querystring-parser            1.2.4
readme-renderer               35.0
regex                         2022.4.24
reportlab                     3.5.65
requests                      2.26.0
requests-oauthlib             1.3.1
requests-toolbelt             0.9.1
retrying                      1.3.4
rfc3986                       1.5.0
rich                          12.4.1
rsa                           4.7.2
s3transfer                    0.5.2
scandir                       1.10.0
schema                        0.7.5
scikit-image                  0.17.2
scikit-learn                  1.0
scipy                         1.6.1
SecretStorage                 3.3.1
Send2Trash                    1.8.0
setuptools                    59.8.0
setuptools-git                1.2
setuptools-scm                6.4.2
shellingham                   1.4.0
simplegeneric                 0.8.1
singledispatch                3.6.1
six                           1.16.0
smmap                         5.0.0
sniffio                       1.3.0
snowballstemmer               2.2.0
sortedcontainers              2.4.0
soupsieve                     2.3.1
Sphinx                        4.2.0
sphinx-rtd-theme              0.4.3
sphinxcontrib-applehelp       1.0.2
sphinxcontrib-asyncio         0.3.0
sphinxcontrib-devhelp         1.0.2
sphinxcontrib-htmlhelp        2.0.0
sphinxcontrib-jsmath          1.0.1
sphinxcontrib-qthelp          1.0.3
sphinxcontrib-serializinghtml 1.1.5
sphinxcontrib-websupport      1.2.4
SQLAlchemy                    1.4.3
sqlparse                      0.4.2
starlette                     0.18.0
subprocess32                  3.5.4
sympy                         1.9
tabulate                      0.8.10
tensorboard                   2.7.0
termcolor                     1.1.0
terminado                     0.12.1
testpath                      0.4.2
threadpoolctl                 3.1.0
tifffile                      2022.5.4
TkinterTreectrl               2.0
toml                          0.10.2
tomli                         1.2.3
tomlkit                       0.7.2
toolz                         0.12.0
tornado                       6.1
tox                           3.24.5
tqdm                          4.61.1
traitlets                     5.1.1
trio                          0.21.0
twine                         3.4.1
Twisted                       21.7.0
twisted-iocpsupport           1.0.1
typed-ast                     1.5.3
typing-extensions             3.10.0.2
ujson                         4.0.1
urllib3                       1.26.8
uvicorn                       0.17.5
virtualenv                    20.13.2
waitress                      2.0.0
wcwidth                       0.2.5
webencodings                  0.5.1
websocket-client              0.59.0
Werkzeug                      2.1.2
wheel                         0.37.0
widgetsnbextension            3.5.2
win-unicode-console           0.5
WMI                           1.5.1
wrapt                         1.13.3
xlrd                          2.0.1
XlsxWriter                    3.0.2
xlwt                          1.3.0
yarl                          1.8.2
zipp                          3.8.0
zope.event                    4.5.0
zope.interface                5.4.0

Supported Packages - Linux

absl-py                       1.0.0
aiohttp                       3.8.1
aiosignal                     1.3.1
alabaster                     0.7.12
alembic                       1.9.4
anyio                         3.6.2
apipkg                        2.1.0
appdirs                       1.4.4
argon2-cffi                   21.1.0
asgiref                       3.6.0
asn1crypto                    1.5.0
astroid                       2.10.0
astunparse                    1.6.3
async-generator               1.10
async-timeout                 4.0.2
atomicwrites                  1.3.0
attrs                         21.4.0
Automat                       20.2.0
Babel                         2.9.1
backcall                      0.2.0
bcrypt                        3.2.0
beautifulsoup4                4.10.0
bleach                        4.1.0
boto3                         1.21.15
botocore                      1.24.46
bson                          0.5.10
CacheControl                  0.12.10
cachetools                    5.3.0
cachy                         0.3.0
certifi                       2021.10.8
cffi                          1.15.0
chardet                       4.0.0
charset-normalizer            2.0.12
cleo                          0.8.1
click                         8.1.3
clikit                        0.6.2
cloudpickle                   2.0.0
colorama                      0.4.3
commonmark                    0.9.1
configparser                  5.0.2
constantly                    15.1.0
contextlib2                   21.6.0
cov-core                      1.15.0
coverage                      6.3.2
cppy                          1.1.0
crashtest                     0.3.1
cryptography                  3.3.2
curio                         1.6
cycler                        0.11.0
Cython                        0.29.28
cytoolz                       0.11.2
dask                          2022.2.1
databricks-cli                0.17.0
debugpy                       1.5.1
decorator                     5.1.1
defusedxml                    0.7.1
deprecation                   2.1.0
distlib                       0.3.4
dnspython                     2.2.1
docker                        5.0.0
docopt                        0.6.2
docutils                      0.17.1
editables                     0.3
email-validator               1.3.1
entrypoints                   0.3
et-xmlfile                    1.1.0
execnet                       1.9.0
ezdxf                         0.17.2
falcon                        3.0.0
falcon-jsonify                1.2
fastapi                       0.76.0
filelock                      3.6.0
flake8                        4.0.1
Flask                         2.1.3
flatbuffers                   20230307175347
flit                          3.2.0
flit_core                     3.2.0
frozenlist                    1.3.3
fsspec                        2022.5.0
gast                          0.5.3
gevent                        1.4.0
gitdb                         4.0.10
GitPython                     3.1.27
glob2                         0.7
google-auth                   2.6.6
google-auth-oauthlib          0.5.1
google-pasta                  0.2.0
graphviz                      0.19.1
greenlet                      1.1.2
grpcio                        1.44.0
gunicorn                      20.1.0
h11                           0.12.0
h2                            4.1.0
h5py                          3.2.1
hatchling                     1.5.0
hdbscan                       0.8.27
hpack                         4.0.0
html5lib                      1.1
httpcore                      0.14.7
httpx                         0.22.0
hyperframe                    6.0.1
hyperlink                     21.0.0
hypothesis                    6.39.3
idna                          3.3
imageio                       2.16.1
imagesize                     1.3.0
importlib-metadata            4.11.3
importlib-resources           5.8.0
imutils                       0.5.4
incremental                   21.3.0
iniconfig                     1.1.1
invoke                        1.7.1
ipykernel                     6.15.1
ipyparallel                   6.2.4
ipython                       7.25.0
ipython-genutils              0.2.0
ipywidgets                    7.6.5
isort                         5.7.0
itsdangerous                  2.1.2
jdcal                         1.4.1
jedi                          0.18.1
jeepney                       0.6.0
Jinja2                        3.0.3
jmespath                      0.10.0
joblib                        1.1.0
jsondiff                      2.0.0
jsonpath-ng                   1.5.3
jsonschema                    4.4.0
jupyter                       1.0.0
jupyter-client                7.0.6
jupyter-console               6.4.4
jupyter-core                  4.9.2
jupyter-packaging             0.11.0
keras                         2.7.0
Keras-Preprocessing           1.1.2
keyring                       21.5.0
kiwisolver                    1.3.2
lazy-object-proxy             1.7.1
locket                        1.0.0
lxml                          4.6.3
m2r                           0.3.1
Mako                          1.2.0
Markdown                      3.3.6
MarkupSafe                    2.1.0
matplotlib                    3.3.0
matplotlib-inline             0.1.3
mccabe                        0.6.1
metakernel                    0.27.5
mflow                         0.0.4
mglearn                       0.1.9
mistune                       0.8.4
mlflow                        1.24.0
mock                          4.0.3
more-itertools                8.12.0
mpmath                        1.2.1
msgpack                       1.0.3
multidict                     6.0.4
multipledispatch              0.6.0
nats-py                       2.1.7
nbconvert                     5.6.1
nbformat                      5.2.0
nest-asyncio                  1.5.5
networkx                      2.7.1
nltk                          3.7
nose2                         0.11.0
notebook                      6.4.7
numpy                         1.22.1
numpydoc                      1.1.0
oauthlib                      3.2.0
olefile                       0.46
openpyxl                      3.0.9
opt-einsum                    3.3.0
outcome                       1.2.0
packaging                     20.9
paho-mqtt                     1.6.1
panci                         0.0.2
pandas                        1.3.1
pandocfilters                 1.5.0
paramiko                      2.7.1
parso                         0.8.3
partd                         1.2.0
pastel                        0.2.1
pathlib2                      2.3.7.post1
pathspec                      0.11.0
pbr                           5.8.1
pexpect                       4.8.0
pickleshare                   0.7.5
Pillow                        9.0.1
pip                           22.3.1
pkgconfig                     1.5.5
pkginfo                       1.8.2
platformdirs                  2.5.1
plotly                        4.14.3
pluggy                        1.0.0
ply                           3.11
poetry                        1.1.13
poetry-core                   1.0.8
portalocker                   2.4.0
portpicker                    1.3.9
prettytable                   3.1.1
prometheus-client             0.12.0
prometheus-flask-exporter     0.18.7
prompt-toolkit                3.0.28
protobuf                      3.19.2
psutil                        5.9.0
ptvsd                         4.3.2
ptyprocess                    0.7.0
py                            1.11.0
py-make                       0.1.1
pyasn1                        0.4.8
pyasn1-modules                0.2.8
pybind11                      2.10.3
pycodestyle                   2.8.0
pycparser                     2.21
pydantic                      1.9.2
pydash                        6.0.2
pyDOE                         0.3.8
pyDOE2                        1.3.0
pydot                         1.4.2
pyflakes                      2.4.0
Pygments                      2.11.2
PyHamcrest                    2.0.3
PyJWT                         2.4.0
pylev                         1.4.0
pylint                        2.6.0
PyNaCl                        1.4.0
pyodbc                        4.0.32
pyparsing                     3.0.7
pypiserver                    1.4.2
pyrsistent                    0.18.1
pytest                        7.0.1
pytest-cov                    3.0.0
pytest-forked                 1.6.0
pytest-localserver            0.5.1.post0
pytest-reportlog              0.2.1
pytest-runner                 6.0.0
pytest-timeout                2.1.0
pytest-xdist                  2.4.0
python-dateutil               2.8.2
python-docx                   0.8.11
python-mimeparse              1.6.0
python-multipart              0.0.5
python-pptx                   0.6.18
pytoml                        0.1.21
pyttk                         0.3.2
pytz                          2021.3
PyWavelets                    1.1.1
PyYAML                        6.0
pyzmq                         22.0.3
qtconsole                     5.1.1
QtPy                          1.11.2
querystring-parser            1.2.4
readme-renderer               35.0
regex                         2022.4.24
reportlab                     3.5.65
requests                      2.26.0
requests-oauthlib             1.3.1
requests-toolbelt             0.9.1
retrying                      1.3.4
rfc3986                       1.5.0
rich                          12.4.1
rsa                           4.7.2
s3transfer                    0.5.2
scandir                       1.10.0
schema                        0.7.5
scikit-image                  0.17.2
scikit-learn                  1.0
scipy                         1.6.1
SecretStorage                 3.3.1
Send2Trash                    1.8.0
setuptools                    59.8.0
setuptools-git                1.2
setuptools-scm                6.4.2
shellingham                   1.4.0
simplegeneric                 0.8.1
singledispatch                3.6.1
six                           1.16.0
smmap                         5.0.0
sniffio                       1.3.0
snowballstemmer               2.2.0
sortedcontainers              2.4.0
soupsieve                     2.3.1
Sphinx                        4.2.0
sphinx-rtd-theme              0.4.3
sphinxcontrib-applehelp       1.0.2
sphinxcontrib-asyncio         0.3.0
sphinxcontrib-devhelp         1.0.2
sphinxcontrib-htmlhelp        2.0.0
sphinxcontrib-jsmath          1.0.1
sphinxcontrib-qthelp          1.0.3
sphinxcontrib-serializinghtml 1.1.5
sphinxcontrib-websupport      1.2.4
SQLAlchemy                    1.4.3
sqlparse                      0.4.2
starlette                     0.18.0
subprocess32                  3.5.4
sympy                         1.9
tabulate                      0.8.10
tensorboard                   2.7.0
termcolor                     1.1.0
terminado                     0.12.1
testpath                      0.4.2
threadpoolctl                 3.1.0
tifffile                      2022.5.4
TkinterTreectrl               2.0
toml                          0.10.2
tomli                         1.2.3
tomlkit                       0.7.2
toolz                         0.12.0
tornado                       6.1
tox                           3.24.5
tqdm                          4.61.1
traitlets                     5.1.1
trio                          0.21.0
twine                         3.4.1
Twisted                       21.7.0
typed-ast                     1.5.3
typing-extensions             3.10.0.2
ujson                         4.0.1
urllib3                       1.26.8
uvicorn                       0.17.5
virtualenv                    20.13.2
waitress                      2.0.0
wcwidth                       0.2.5
webencodings                  0.5.1
websocket-client              0.59.0
Werkzeug                      2.1.2
wheel                         0.37.0
widgetsnbextension            3.5.2
wrapt                         1.13.3
xlrd                          2.0.1
XlsxWriter                    3.0.2
xlwt                          1.3.0
yarl                          1.8.2
zipp                          3.8.0
zope.event                    4.5.0
zope.interface                5.4.0

Known Issues

  1. Py TTk does not work.
  2. Python unit testing frame work:
    • Use the following workaround to use the Python unit testing framework:
    import sys
    import unittest
    def addNum(a,b):
      return a + b
    
    def delNum(a,b):
      return a - b
    
    class TestFun(unittest.TestCase):
      def testAdd(self):
        self.assertEqual(2,addNum(1,1))
    
      def testDel(self):
        self.assertEqual(2,addNum(1,1))	
    try:
      if __name__ == "__main__":
        unittest.main(argv=[sys.argv[0]])
    except SystemExit:
      pass
  3. Debugger
    • Built-in data types are supported.
    • Imported data types are not supported in the Watch window.
  4. Python command window may not be usable after executing an IPython magic command, such as %quickref.
  5. You cannot use the tkinter package.
  6. Debugger watch window:
    • Any element added to or deleted from the existing container is not reflected in the Watch window. For example:

    • Add a breakpoint at line 2 and add ‘data’ to the Watch window:

    • Add a break point at line 4. 'data' is updated in the Watch window, but only three elements are displayed under 'data'.

  7. The following limitations exist when using the system commands and the os.system() function.
    • Launching a new console freezes the application on Windows.
      • The following code freezes application:
         import os;os.system('cmd.exe')
      • Use this code as a workaround:
        import os;os.system('start cmd.exe')
    • Using the pause command as shown below freezes the application on Windows and does not work as expected on Linux.
      import os;os.system('pause')
  8. Installing/upgrading Python packages fails on Windows when the install path is too long.
    • Windows has limited path length support. Paths longer than MAX_PATH (historically defined as 260 characters) does not resolve and can cause errors.
    • While installing/upgrading the Python package, the entire installation path is appended to the TEMP path, which can exceed the maximum path length supported by Windows.
    • Example:

      Compose installation path: D:\Program Files\Altair\20xx.x

      Upgrading pip using the command "python.exe -m pip install --upgrade pip" creates following error message:
      FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\<username>\\AppData\\Local\\Temp\\pip-vefbh9ve-uninstall\\program files\\altair\\20xx.x\\compose20xx.x\\common\\python\\python3.5\\win64\\lib\\site-packages\\pip\\_vendor\\requests\\packages\\urllib3\\packages\\ssl_match_hostname\\__pycache__\\__init__.cpython-35.pyc'
  9. Administrative rights are required to install Python modules in restricted directories.

    If Compose is installed in "C:\Program Files\...", administrative rights are required to update or install Python modules.

  10. To import a user-defined Python module, add the location of the module to sys.path.

    For example: import sys; sys.path.append("D:/user_module")

  11. While executing a Python script in the Command Window , add the "liveexecution()" function call after the Python print statement to live print.
    For example:
    for i in range(1,5000):
    print( i )
    liveexecution()
Note: You may experience unexpected results if PYTHONHOME points to a Python library version other than Python 3.8, or if PYTHONPATH points to Python modules which are not compatible with Python 3.8.