Python Support

Compose supports Python 3.5.4 as a scripting language.

Supported Packages - Windows

  • absl-py 0.7.0
  • adodbapi 2.6.0.7
  • alabaster 0.7.10
  • apipkg 1.4
  • appdirs 1.4.3
  • asn1crypto 0.24.0
  • astroid 1.6.1
  • atomicwrites 1.3.0
  • attrs 17.4.0
  • Automat 0.6.0
  • Babel 2.5.3
  • bcrypt 3.1.6
  • bleach 2.1.3
  • certifi 2018.11.29
  • cffi 1.11.5
  • chardet 3.0.4
  • cloudpickle 0.2.1
  • colorama 0.3.9
  • constantly 15.1.0
  • cov-core 1.15.0
  • coverage 4.5.1
  • cryptography 2.2.2
  • cycler 0.10.0
  • Cython 0.29.6
  • cytoolz 0.9.0.1
  • dask 0.18.2
  • decorator 4.2.1
  • docopt 0.6.2
  • docutils 0.14
  • entrypoints 0.3
  • et-xmlfile 1.0.1
  • execnet 1.5.0
  • ezdxf 0.8.9
  • falcon 1.4.1
  • falcon-jsonify 1.2
  • filelock 3.0.0
  • flake8 3.5.0
  • graphviz 0.9
  • h5py 2.7.1
  • html5lib 1.0.1
  • hyperlink 18.0.0
  • hypothesis 3.48.1
  • idna 2.6
  • imageio 2.3.0
  • imagesize 1.0.0
  • incremental 17.5.0
  • ipykernel 4.8.2
  • ipython 6.2.1
  • ipython-genutils 0.2.0
  • isort 4.3.4
  • jdcal 1.4
  • jedi 0.11.1
  • Jinja2 2.10
  • jupyter 1.0.0
  • jupyter-client 5.2.2
  • jupyter-core 4.4.0
  • kiwisolver 1.0.1
  • lazy-object-proxy 1.3.1
  • locket 0.2.0
  • lxml 4.3.2
  • m2r 0.2.1
  • Markdown 2.6.11
  • MarkupSafe 1.1.0
  • matplotlib 3.0.3
  • mccabe 0.6.1
  • mglearn 0.1.7
  • mistune 0.8.3
  • mock 2.0.0
  • more-itertools 4.3.0
  • mpmath 1.0.0
  • networkx 2.1
  • nltk 3.2.5
  • numpy 1.15.0
  • numpydoc 0.8.0
  • olefile 0.46
  • openpyxl 2.6.0
  • packaging 17.1
  • pandas 0.22.0
  • paramiko 2.4.2
  • parso 0.1.1
  • partd 0.3.8
  • pathlib2 2.3.3
  • pbr 3.1.1
  • pexpect 4.4.0
  • pickleshare 0.7.4
  • Pillow 5.1.0
  • pip 18.0
  • pkgconfig 1.4.0
  • pkginfo 1.5.0.1
  • pluggy 0.8.1
  • prompt-toolkit 1.0.15
  • protobuf 3.5.2
  • psutil 5.4.3
  • py 1.5.2
  • py-make 0.1.0
  • pyasn1 0.4.2
  • pycodestyle 2.3.1
  • pycparser 2.19
  • pyflakes 1.6.0
  • Pygments 2.2.0
  • PyHamcrest 1.9.0
  • pylint 1.8.2
  • PyNaCl 1.3.0
  • pyparsing 2.2.0
  • pypiserver 1.2.7
  • pypiwin32 223
  • pyreadline 2.1
  • pytest 4.0.2
  • pytest-cov 2.5.1
  • pytest-forked 0.2
  • pytest-localserver 0.5.0
  • pytest-runner 4.0
  • pytest-timeout 1.2.1
  • pytest-wholenodeid 0.2
  • pytest-xdist 1.22.2
  • python-dateutil 2.7.5
  • python-mimeparse 1.6.0
  • python-pptx 0.6.17
  • pyttk 0.3.2
  • pytz 2018.9
  • PyWavelets 0.5.2
  • pywin32 224
  • pyzmq 14.1.1
  • qtconsole 4.2.1
  • reportlab 3.3.0
  • requests 2.21.0
  • requests-toolbelt 0.9.1
  • scandir 1.9.0
  • scikit-image 0.14.0
  • scikit-learn 0.20.2
  • scipy 1.0.1
  • setuptools 40.0.0
  • setuptools-scm 1.15.7
  • simplegeneric 0.8.1
  • singledispatch 3.4.0.3
  • six 1.12.0
  • snowballstemmer 1.2.1
  • Sphinx 1.7.1
  • sphinx-rtd-theme 0.2.4
  • sphinxcontrib-asyncio 0.2.0
  • sphinxcontrib-websupport 1.0.1
  • sympy 1.1.1
  • tensorflow 1.5.0
  • tensorflow-tensorboard 1.5.1
  • testpath 0.4.2
  • TkinterTreectrl 2.0
  • toml 0.9.4
  • toolz 0.9.0
  • tornado 4.5.3
  • tox 3.7.0
  • tqdm 4.31.1
  • traitlets 4.3.2
  • twine 1.9.1
  • Twisted 17.9.0
  • typing 3.6.4
  • urllib3 1.22
  • virtualenv 15.1.0
  • waitress 1.1.0
  • wcwidth 0.1.7
  • webencodings 0.5.1
  • Werkzeug 0.14.1
  • wheel 0.30.0
  • win-unicode-console 0.5
  • wrapt 1.10.11
  • XlsxWriter 0.2.1
  • zope.event 4.4
  • zope.interface 4.4.3

Supported Packages - Linux

  • absl-py 0.1.11
  • alabaster 0.7.10
  • apipkg 1.4
  • asn1crypto 0.24.0
  • astroid 1.6.1
  • atomicwrites 1.3.0
  • attrs 17.4.0
  • Automat 0.6.0
  • Babel 2.5.3
  • bcrypt 3.1.4
  • bleach 2.1.3
  • certifi 2018.11.29
  • cffi 1.11.5
  • chardet 3.0.4
  • cloudpickle 0.2.1
  • colorama 0.3.9
  • constantly 15.1.0
  • cov-core 1.15.0
  • coverage 4.5.1
  • cryptography 2.2.2
  • cycler 0.10.0
  • Cython 0.29.6
  • cytoolz 0.9.0.1
  • dask 0.18.2
  • decorator 4.2.1
  • docopt 0.6.2
  • docutils 0.14
  • entrypoints 0.3
  • et-xmlfile 1.0.1
  • execnet 1.5.0
  • ezdxf 0.8.9
  • falcon 1.4.1
  • falcon-jsonify 1.2
  • filelock 3.0.0
  • flake8 3.5.0
  • graphviz 0.9
  • h5py 2.7.1
  • html5lib 1.0.1
  • hyperlink 18.0.0
  • hypothesis 3.48.1
  • idna 2.6
  • imageio 2.3.0
  • imagesize 1.0.0
  • incremental 17.5.0
  • ipykernel 4.8.2
  • ipython 6.2.1
  • ipython-genutils 0.2.0
  • isort 4.3.4
  • jdcal 1.4
  • jedi 0.11.1
  • Jinja2 2.10
  • jupyter 1.0.0
  • jupyter-client 5.2.2
  • jupyter-core 4.4.0
  • kiwisolver 1.0.1
  • lazy-object-proxy 1.3.1
  • locket 0.2.0
  • lxml 4.3.2
  • m2r 0.2.1
  • Markdown 2.6.11
  • MarkupSafe 1.1.0
  • matplotlib 3.0.3
  • mccabe 0.6.1
  • mglearn 0.1.7
  • mistune 0.8.3
  • mock 2.0.0
  • more-itertools 4.3.0
  • mpmath 1.0.0
  • networkx 2.1
  • nltk 3.2.5
  • numpy 1.15.0
  • numpydoc 0.8.0
  • olefile 0.46
  • openpyxl 2.6.0
  • packaging 17.1
  • pandas 0.22.0
  • paramiko 2.4.2
  • parso 0.1.1
  • partd 0.3.8
  • pathlib2 2.3.3
  • pbr 3.1.1
  • pexpect 4.4.0
  • pickleshare 0.7.4
  • Pillow 5.1.0
  • pip 18.0
  • pkgconfig 1.4.0
  • pkginfo 1.5.0.1
  • pluggy 0.8.1
  • prompt-toolkit 1.0.15
  • protobuf 3.5.2
  • psutil 5.4.3
  • ptyprocess 0.5.2
  • py 1.5.2
  • py-make 0.1.0
  • pyasn1 0.4.2
  • pycodestyle 2.3.1
  • pycparser 2.19
  • pyflakes 1.6.0
  • Pygments 2.2.0
  • PyHamcrest 1.9.0
  • pylint 1.8.2
  • PyNaCl 1.3.0
  • pyparsing 2.2.0
  • pypiserver 1.2.7
  • pytest 4.0.2
  • pytest-cov 2.5.1
  • pytest-forked 0.2
  • pytest-localserver 0.5.0
  • pytest-runner 4.0
  • pytest-timeout 1.2.1
  • pytest-wholenodeid 0.2
  • pytest-xdist 1.22.2
  • python-dateutil 2.7.5
  • python-mimeparse 1.6.0
  • python-pptx 0.6.17
  • pyttk 0.3.2
  • pytz 2018.9
  • PyWavelets 0.5.2
  • pyzmq 14.1.1
  • qtconsole 4.2.1
  • reportlab 3.3.0
  • requests 2.21.0
  • requests-toolbelt 0.9.1
  • scandir 1.9.0
  • scikit-image 0.14.0
  • scikit-learn 0.20.2
  • scipy 1.0.1
  • setuptools 40.0.0
  • setuptools-scm 1.15.7
  • simplegeneric 0.8.1
  • singledispatch 3.4.0.3
  • six 1.12.0
  • snowballstemmer 1.2.1
  • Sphinx 1.7.1
  • sphinx-rtd-theme 0.2.4
  • sphinxcontrib-asyncio 0.2.0
  • sphinxcontrib-websupport 1.0.1
  • sympy 1.1.1
  • tensorflow 1.5.0
  • tensorflow-tensorboard 1.5.1
  • TkinterTreectrl 2.0
  • toml 0.9.4
  • toolz 0.9.0
  • tornado 4.5.3
  • tox 3.7.0
  • tqdm 4.31.1
  • traitlets 4.3.2
  • twine 1.9.1
  • Twisted 17.9.0
  • typing 3.6.4
  • urllib3 1.22
  • virtualenv 15.1.0
  • waitress 1.1.0
  • wcwidth 0.1.7
  • webencodings 0.5.1
  • Werkzeug 0.14.1
  • wheel 0.30.0
  • wrapt 1.10.11
  • XlsxWriter 0.2.1
  • zope.event 4.4
  • zope.interface 4.4.3

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\2019.1

      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\\2019.1\\compose2019.1\\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.

Note: You may experience unexpected results if PYTHONHOME points to a Python library version other than Python 3.5, or if PYTHONPATH points to Python modules which are not compatible with Python version 3.5.