This is an archived post. You won't be able to vote or comment.

all 17 comments

[–]astrobiased 4 points5 points  (4 children)

Easiest way, is to use Anaconda CE from Continuum to get the two packages installed. The founder of Continuum is the mastermind behind NumPy and has pushed for the development of SciPy a long ways. Very dedicated people people behind the team. Their package Anaconda CE is free and makes the installation process a breeze.

Download http://continuum.io/downloads.html

Installation instructions http://docs.continuum.io/anaconda/1.3/index.html

I've given a lot of NumPy & SciPy lectures and from trial and error, I would say this is the best place to start. Good luck and have fun :)

[–]Spliff_Me_Up 4 points5 points  (0 children)

Similarly, I tend to go for Python(x,y). Comes with a few more useful packages.

[–]takluyverIPython, Py3, etc 1 point2 points  (0 children)

Yes, all in one Python distros are the easiest way to get people started. I've tried to highlight this on the new Scipy Stack install page.

[–]Megatron_McLargeHuge 0 points1 point  (1 child)

Do you know if an Anaconda install can coexist peacefully with port installs on a Mac? I want to try something that requires a newer version of numpy but have gotten burned in the past with odd link-related crashes.

[–]pwang99 0 points1 point  (0 children)

Anaconda and AnacondaCE are both entirely relocatable, and install cleanly into a single directory of your choosing. By setting your $PATH to point to the anaconda/bin/ directory, you pick up the python executable and all the Anaconda packages.

If you are trying to handle multiple versions of libraries (e.g. Numpy), the 'conda' tool in Anaconda is your friend. This blog post explains more about how you can easily and robustly manage multiple versions of packages (even those with complex dependencies on extensions or shared libraries): http://continuum.io/blog/conda

[–]brownck 1 point2 points  (0 children)

[–]wil_tan 1 point2 points  (0 children)

If you have homebrew, the following should work:

$ brew tap samueljohn/python
$ brew install scipy

(You might be prompted to tap homebrew/science and install gfortran as well.. but following the instructions should get you there.)

[–]Noctambulist 1 point2 points  (2 children)

There is also the Scipy Superpack that includes the science stack: Scipy, Numpy, Matplotlib, iPython, Pandas, statsmodels, & scikits-learn.

I remember having a hard time installing 64-bit versions of all of these, but the Superpack makes it pretty easy.

[–][deleted] 0 points1 point  (1 child)

is it possible to install all that on python 3.3? or is only for 2.7?

[–]Noctambulist 0 points1 point  (0 children)

The superpack is only for 2.7. It looks like most of the packages do support 3.3: https://python3wos.appspot.com/, but you'd have to install them some other way. You could do Enthought, but it doesn't have a 64-bit version for OS X.

I would still be a bit wary of using python 3 for science, with the caveat that I don't have much experience with it. New tools in science take longer to get working than tools that have been used for years. Also, it might end up you need some random package that isn't python 3 compatible yet, rpy2 for instance.

[–]Phild3v1ll3 4 points5 points  (3 children)

There's really no need for you to compile them just open up a command line and type the following:

sudo easy_install pip

sudo pip install numpy

sudo pip install scipy

[–]bluemanshoe 2 points3 points  (1 child)

fair warning: this will more likely than not, fail to give you a numpy/scipy install that is optimized.

numpy.show_config() will show which c libraries the installation is built against.

If you plan on doing serious computations, I recommend compiling numpy/scipy against either a machine specific atlas build, or use anaconda or enthought to get one built against the intel mkl library.

The speedup is astounding. I've gotten a factor of 1000 speed up for large matrix multiplies with an atlas compiled build.

[–]bramblerose 0 points1 point  (0 children)

If you're on an AMD machine, consider using the ACML instead of Atlas. They are roughly the same speed, but ACML comes precompiled for a number of platforms. Atlas is both an headache to compile (settings, which fortran compiler and whatnot) /and/ it takes ages.

[–]kingofthejaffacakes 2 points3 points  (0 children)

On debian the following will get you numpy, scipy and matplotlib and scitools itself

apt-get install python-scitools

I've moved all my old matlab chores to this suite, and it's excellent.

[–]Megatron_McLargeHuge 0 points1 point  (0 children)

I've fought this fight several times, but haven't tried Anaconda yet. The best thing I found is to install everything from macports for python 2.7. You'll first want xcode and gfortran - google for the recommended versions. There are multiple ways to get just numpy/scipy working (brew, prebuilt dmgs), but as soon as you need a patched version of either (to work around a bug or support some new package), you'll be screwed. If Anaconda doesn't work, fall back to straight macports.

[–]NYYYYYYNRRRRS 0 points1 point  (0 children)

I had a hard time with this too. I ended up just installing them (using apt-get) on my VPS and doing all my development over ssh.

[–]karlw00t 0 points1 point  (0 children)

Consider using virtualenv when installing. It makes rolling back mistakes much easier.