Installation

To install molPX , you need a few Python package dependencies. If these dependencies are not available in their required versions, the installation will fail. We recommend one particular way for the installation that is relatively safe, but you are welcome to try another approaches if you know what you are doing.

Python Package Index (PyPI)

If you do not like Anaconda for some reason you should use the Python package manager pip to install. This is not recommended, because in the past, various problems have arisen with pip in compiling the packages that molPX depends upon, see this issue for more information.

  1. If you do not have pip, please read the install guide: install guide.

  2. Make sure pip is enabled to install so called wheel packages:

    pip install wheel
    

    Now you are able to install binaries if you use MacOSX or Windows.

  3. Install molPX using

    pip install molPX
    
  4. Check your installation

    python
    >>> import molpx
    >>> molpx.__version__
    

    should print 0.1.2 or later

    >>> import IPython
    >>> IPython.__version__
    

    should print 3.1 or later. If ipython is not up to date, update it by pip install ipython

Building from Source

Building all dependencies from molPX from source is sometimes (if not usually) tricky, takes a long time and is error prone. It is not recommended nor supported by us. If unsure, use the Anaconda installation.

What you can do is clone or download the source from github. After that, just cd to the download directory (and untar/unzip if necessary) and:

>>> cd molPX
>>> python setup.py install

but be aware that success is not guaranteed. See the “Known Issues” below.

Known Issues

  • After a successfull installation and execution of molpx.example_notebooks()…no widgets are shown! Most probably, this has to do with nglview and its needed Jupyter notebook extensions.

This is a known, frustrating behaviour:

We’are aware of this and molPX automatically checks for the needed extensions every time it gets imported, s.t. it will refuse to start-up if it finds any problems. If somehow it manages to start-up but no widget is shown, try issuing

molpx._auto_enable_extensions()

restarting everything and trying again. Otherwise, check the above links.

  • A SandboxViolation error might appear when installing from source. This is because the nglview dependency

is trying to enable the needed extensions. Until we figure this out, try to install nglview externally issuing:

>>> conda install nglview -c bioconda

or, alternatively

>>> pip install nglview
  • Note that molPX only works with nglview versions >=0.6.2.1.