1

I installed a tool called mgltools using following command

conda install mgltools

When I tried to test the installation using command pmv I got following error

setting PYTHONHOME environment
Run PMV from  /home/satyajeet/miniconda2/MGLToolsPckgs/Pmv
Traceback (most recent call last):
  File "/home/satyajeet/miniconda2/MGLToolsPckgs/Pmv/__init__.py", line 369, in runPmv
    from mglutil.splashregister.splashscreen import SplashScreen
  File "/home/satyajeet/miniconda2/MGLToolsPckgs/mglutil/splashregister/splashscreen.py", line 7, in <module>
    from mglutil.util.misc import ensureFontCase
  File "/home/satyajeet/miniconda2/MGLToolsPckgs/mglutil/util/misc.py", line 19, in <module>
    import numpy.oldnumeric as Numeric
ImportError: No module named oldnumeric
hit enter to continue

From online forums, I found that the problem is numpy version. The oldnumeric support was withdrawn after numpy 1.9 and I was running numpy 1.15. So I downgraded numpy to numpy 1.8.1 using following command

python -m pip install numpy==1.8.1

But now I get a new error

setting PYTHONHOME environment
Run PMV from  /home/satyajeet/miniconda2/MGLToolsPckgs/Pmv
Traceback (most recent call last):
  File "/home/satyajeet/miniconda2/MGLToolsPckgs/Pmv/__init__.py", line 378, in runPmv
    from Pmv.moleculeViewer import MoleculeViewer
  File "/home/satyajeet/miniconda2/MGLToolsPckgs/Pmv/moleculeViewer.py", line 21, in <module>
    from DejaVu.Geom import Geom
  File "/home/satyajeet/miniconda2/MGLToolsPckgs/DejaVu/__init__.py", line 200, in <module>
    from Viewer import Viewer
  File "/home/satyajeet/miniconda2/MGLToolsPckgs/DejaVu/Viewer.py", line 53, in <module>
    from DejaVu.Camera import Camera
  File "/home/satyajeet/miniconda2/MGLToolsPckgs/DejaVu/Camera.py", line 41, in <module>
    import Image
ImportError: No module named Image
hit enter to continue

I can import Image using

>>> from PIL import Image

Any suggestions please?

Output of pip freeze

absl-py==0.5.0
alabaster==0.7.11
asn1crypto==0.24.0
Babel==2.6.0
backports-abc==0.5
backports.functools-lru-cache==1.5
certifi==2018.8.24
cffi==1.11.5
chardet==3.0.4
conda==4.5.11
cryptography==2.3.1
cycler==0.10.0
Cython==0.28.5
decorator==4.3.0
deepTools==3.1.2
dill==0.2.8.2
Django==1.11.15
dm-sonnet==1.23
docutils==0.14
enum34==1.1.6
functools32==3.2.3.post2
futures==3.2.0
idna==2.7
image==1.5.25
imagesize==1.1.0
ipaddress==1.0.22
ipython-genutils==0.2.0
Jinja2==2.10
jsonschema==2.6.0
jupyter-core==4.4.0
kiwisolver==1.0.1
MACS==1.4.2
MarkupSafe==1.0
matplotlib==2.2.3
mkl-fft==1.0.6
mkl-random==1.0.1
nbformat==4.4.0
numpy==1.8.1
numpydoc==0.8.0
oldnumeric==1.0.4
packaging==17.1
pandas==0.23.4
Pillow==5.2.0
plotly==3.2.1
Pmw==2.0.1
py2bit==0.3.0
pyBigWig==0.3.12
pycosat==0.6.3
pycparser==2.18
Pygments==2.2.0
pyOpenSSL==18.0.0
pyparsing==2.2.1
pysam==0.15.0
PySocks==1.6.8
python-dateutil==2.7.3
pytz==2018.5
requests==2.19.1
retrying==1.3.3
ruamel-yaml==0.15.46
scipy==1.1.0
singledispatch==3.4.0.3
six==1.11.0
snowballstemmer==1.2.1
Sphinx==1.8.1
sphinxcontrib-websupport==1.1.0
subprocess32==3.5.2
tornado==5.1.1
traitlets==4.3.2
typing==3.6.6
urllib3==1.23

Update 1:

Following this suggestion, I setup a PIL module. I got

fatal error: X11/Xlib.h: No such file or directory

It was solved as described here. But now the new error if I try to execute pmv is..

ValueError: Attempted relative import in non-package
ivan_pozdeev
  • 33,874
  • 19
  • 107
  • 152
  • What is the problem now? You can import `Image` too right? – Vineeth Sai Sep 26 '18 at 05:55
  • yes, but I still get the same error (ImportError: No module named Image) if I try to execute pmv :( – Satyajeet Khare Sep 26 '18 at 05:57
  • Can you post the full traceback please as well as the output from `pip freeze`? – a_guest Sep 26 '18 at 06:00
  • @SatyajeetKhare I've rolled back your last edit because [traceback is a required part of an error message, it's necessary to diagnose the problem.](http://idownvotedbecau.se/noexceptiondetails/) – ivan_pozdeev Sep 26 '18 at 08:01
  • Okay, thanks for doing that. – Satyajeet Khare Sep 26 '18 at 08:03
  • @SatyajeetKhare Just to let you know, I upvoted your question specifically because all the necessary info for diagnostics, including the tracebacks, was present and let me instantly see what's wrong ;-) (specifically, that it's an incompatibility in the 1st case, and same and/or a missing dependency in the 2nd one). – ivan_pozdeev Sep 26 '18 at 08:10

1 Answers1

4

MGLtools looks abandoned, and its conda package is unusable. The latest release was in 2012, the download page of the official site was last updated in 2015, and so on.

As you could see, the conda package is incompatible with recent versions of other packages, and, judging by the contents of the files for download, it is built for Python 2.5(!).

  • so even if you get the necessary Python modules (whatever they are), you'll still have to recompile it against the available Python for extension modules to be usable.

You were only able to install the package with conda because its metadata (info/index.json in a .tar.gz) doesn't specify its dependencies (at all).

So, if you still wish to try it out, your best bet is to try to make a standalone installation from an official download package from Downloads — MGLTools. Those packages include the necessary version of Python and other dependencies.

ivan_pozdeev
  • 33,874
  • 19
  • 107
  • 152