MDAnalysis installation

619 views
Skip to first unread message

SJ

unread,
Mar 25, 2016, 1:18:55 AM3/25/16
to MDnalysis discussion
Hi,

I tried to install MDAnalysis on my home user or on the terminal of macintosh, but there is no chance.
pip does not work on mac (python 2.7) and with brew there are some errors. And in the case of home user (python 2.6.6) it cannot locate MDAnalysis and pip command isn't familiar to system as well.

It seems there is no chance to installation. Does anybody have any idea about that?

Many thanks in advance.
S.J.

Zhenbo Li

unread,
Mar 25, 2016, 10:03:23 AM3/25/16
to mdnalysis-...@googlegroups.com
How about miniconda[1]?

The solution is quite simple[2]:

conda config --add channels MDAnalysis
conda install mdanalysis



[1]: http://conda.pydata.org/miniconda.html
[2]: http://www.mdanalysis.org/pages/installation_quick_start/
> --
> You received this message because you are subscribed to the Google Groups
> "MDnalysis discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mdnalysis-discus...@googlegroups.com.
> To post to this group, send email to mdnalysis-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/mdnalysis-discussion.
> For more options, visit https://groups.google.com/d/optout.



--
Have a nice day!
Zhenbo Li

Max Linke

unread,
Mar 25, 2016, 10:37:24 AM3/25/16
to mdnalysis-...@googlegroups.com
That won't work on MAC like this. The conda build is only for linux.

Though I'm surprised you have that many problem getting pip to run, but
I suspect some of this has to do with the fact that you have two
different python versions running without a clear way to decide which
one to use.

pip offers a bootstrap script on it's website which you can use to
install it.

Also we don't support python 2.6.x. Only python 2.7 is supported right now.

If you still have problem managing your python environment conda might
still be a good idea. It installs a clean python environment which you
can use and ships with pip. So after installing and setting up conda you
should be able to do simple `pip install MDAnalysis` no root needed.

best Max

Chris Goedde

unread,
Apr 13, 2016, 5:05:33 PM4/13/16
to MDnalysis discussion
I'm also trying to install MDAnalysis on a Mac. (Mac OS 10.11.4)

I have an anaconda install, 2.7.11. (The MDAnalysis docs don't mention it that I can see, but MDAnalysis is python 2, not python 3, correct?) I downloaded MDAnalysis-0.14.0.tar.gz and unpacked.

I ran 'pip install MDAnalysis' and 'pip install MDAnalysisTests'. Both seemed to work; no errors.

When I try to import MDAnalysis, following the "Basic Example" from the docs, I get the following error:

>>> import MDAnalysis

MDAnalysis/lib/transformations.py:1813: UserWarning: failed to import module _transformations

  warnings.warn("failed to import module " + module_name)

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

  File "MDAnalysis/__init__.py", line 151, in <module>

    from .lib import log

  File "MDAnalysis/lib/__init__.py", line 30, in <module>

    from . import distances  # distances relies on mdamath

  File "MDAnalysis/lib/distances.py", line 72, in <module>

    package="MDAnalysis.lib")

  File "/Users/goedde/anaconda/lib/python2.7/importlib/__init__.py", line 37, in import_module

    __import__(name)

ImportError: No module named c_distances


Am I missing some requirement? Any suggestions would be greatly appreciated.

Chris 

Oliver Beckstein

unread,
Apr 13, 2016, 6:48:12 PM4/13/16
to mdnalysis-...@googlegroups.com
Chris,

If the tests pass (all 3000+) then you should be fine.

Do you happen to be in a checked-out source of MDAnalysis?

How about

cd ~
python -c "import MDAnalysis; print MDAnalysis.__version__”

Oliver
> --
> You received this message because you are subscribed to the Google Groups "MDnalysis discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to mdnalysis-discus...@googlegroups.com.
> To post to this group, send email to mdnalysis-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/mdnalysis-discussion.
> For more options, visit https://groups.google.com/d/optout.

--
Oliver Beckstein * orbe...@gmx.net
skype: orbeckst * orbe...@gmail.com

Max Linke

unread,
Apr 14, 2016, 3:57:31 AM4/14/16
to mdnalysis-...@googlegroups.com
This sounds like one of our extensions hasn't been build.
Your installation process also sounds a bit confused because You haven't
installed MDAnalysis from the downloaded source but the packages
available on PyPi. Can you please try again from a clean
environment with the following list of commands

conda create -n mda-test python=2.7 numpy cython pip
source activate mda-test
pip install MDAnalysis
pip install MDAnalysisTests
python -c 'import MDAnalysis'


best Max
> --
> You received this message because you are subscribed to the Google
> Groups "MDnalysis discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to mdnalysis-discus...@googlegroups.com
> <mailto:mdnalysis-discus...@googlegroups.com>.
> To post to this group, send email to
> mdnalysis-...@googlegroups.com
> <mailto:mdnalysis-...@googlegroups.com>.

Chris Goedde

unread,
Apr 16, 2016, 2:31:25 PM4/16/16
to mdnalysis-...@googlegroups.com
Thanks, that worked.

Is it true that MDAnalysis is python 2? Is there a plan or a time frame for migrating it to python 3?

Thanks.

Chris
> You received this message because you are subscribed to a topic in the Google Groups "MDnalysis discussion" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/mdnalysis-discussion/RQjdjRYiU8s/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to mdnalysis-discus...@googlegroups.com.
> To post to this group, send email to mdnalysis-...@googlegroups.com.

Oliver Beckstein

unread,
Apr 16, 2016, 2:35:42 PM4/16/16
to mdnalysis-...@googlegroups.com

Am Apr 16, 2016 um 9:51 schrieb Chris Goedde <chris....@gmail.com>:

> Is it true that MDAnalysis is python 2? Is there a plan or a time frame for migrating it to python 3?

There's work being done on Py3. See issues in the issue tracker marked with Python3.

More help is welcome! Given that this is open source and no-one is currently paid for development, there is no fixed time horizon for having full Py3 but the latest develop runs already under Py3 with reduced functionality (namely DCD are not read).

Oliver

Max Linke

unread,
Apr 16, 2016, 2:44:43 PM4/16/16
to mdnalysis-...@googlegroups.com
Note that you have to source the environment now every time you want to
use MDAnalysis.

I suggest you deinstall mdanalysis in your default environment `pip
uninstall` and reinstall it again. I hope that this works now also in
you default conda environment.

best Max
Reply all
Reply to author
Forward
0 new messages