Install astroML in Anaconda

312 views
Skip to first unread message

Gabriel Perren

unread,
Apr 10, 2016, 2:51:17 PM4/10/16
to astroML-general
Hi,

I'm trying to install astroML in my Anaconda platform. The command:

$ conda install astroml

does not work (no package is found). I came across these two packages in the Anaconda Cloud:



which one should I install? I'm guessing it's the second one since it says v0.3, but I'd like to be sure. Also, why are there two different packages?

Cheers,
Gabriel

Jake Vanderplas

unread,
Apr 10, 2016, 10:47:04 PM4/10/16
to Gabriel Perren, astroML-general
Hi Gabriel,
The best way to install astroML is to use pip:

$ pip install astroML

If you don't have pip installed, you can first install it with conda:

$ conda install astroML

Conda's main advantage over astroML is the ability to keep track of compiled dependencies. Since astroML is pure python, conda is not really necessary.

 Also, why are there two different packages?

Anybody can create their own conda channel and upload builds of any package they want. There are two conda packages because two people have done this with astroML,
   Jake

--
You received this message because you are subscribed to the Google Groups "astroML-general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to astroml-gener...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jake Vanderplas

unread,
Apr 10, 2016, 10:47:50 PM4/10/16
to Gabriel Perren, astroML-general
Conda's main advantage over astroML

Sorry, that should have been "conda's main advantage over pip"

Gabriel Perren

unread,
Apr 10, 2016, 10:59:50 PM4/10/16
to astroML-general, gabrie...@gmail.com
Thanks Jake,

when I attempt to install astroML via:

conda install astroml

I get:

Error:  Package missing in current linux-64 channels: 
  - astroml

Is this because of my 64 bit system? If so, why is there no 64 bit package available?

Jake Vanderplas

unread,
Apr 10, 2016, 11:02:59 PM4/10/16
to Gabriel Perren, astroML-general
That's happening because astroml is not available via conda.

If you've activated one of the conda channels where someone has posted an astroml build, then it's happening because they did not put up a linux-64 build.

Please use pip rather than conda to install astroML,
   Jake

--

Jake Vanderplas

unread,
Apr 10, 2016, 11:06:31 PM4/10/16
to Gabriel Perren, astroML-general
Looking back I see the problem – I should have written ``conda install pip`` rather than ``conda install astroML`` in my first reply.

In other words, you can install astroML this way:

$ conda install pip
$ pip install astroML

Sorry for the confusion. If you need more information, see the installation section of the website: http://www.astroml.org/user_guide/installation.html
   Jake

Gabriel Perren

unread,
Apr 10, 2016, 11:29:05 PM4/10/16
to astroML-general, gabrie...@gmail.com
Thanks again for the clarification Jake.

I understand astroML can be installed via pip, but I was hoping to do it all in one go with conda (using a single requirements.txt file processed with conda).

Just to be clear: you are advising *against* the use of https://anaconda.org/astropy/astroml to install astroML, is this correct?

Any particular reason why I should avoid this type of packages/installation?

Cheers,
Gabriel

Jake Vanderplas

unread,
Apr 11, 2016, 12:02:13 AM4/11/16
to Gabriel Perren, astroML-general
Third-party anaconda channels can contain anything the owners want them to. The package they make available could be a development build; it could be an outdated build; it could be a build that is patched in an opaque manner to work with whatever project they were concerned with when they created the build; it could be a build they were testing and never got quite right, so you'd get a broken package. There's no oversight, no peer review to speak of, and no easy way to tell exactly what's there.

That said, if you're familiar with the third party and trust them, then by all means use their conda build. If not, then you have no idea what you're getting, and you're downloading it at your own risk.

If you want to install the latest release of astroML, the best way to install it is via pip.
   Jake

--

Gabriel Perren

unread,
Apr 11, 2016, 12:25:56 AM4/11/16
to astroML-general, gabrie...@gmail.com
Got it. Once again, thank you very much Jake.
Reply all
Reply to author
Forward
0 new messages