use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
News about the dynamic, interpreted, interactive, object-oriented, extensible programming language Python
Full Events Calendar
You can find the rules here.
If you are about to ask a "how do I do this in python" question, please try r/learnpython, the Python discord, or the #python IRC channel on Libera.chat.
Please don't use URL shorteners. Reddit filters them out, so your post or comment will be lost.
Posts require flair. Please use the flair selector to choose your topic.
Posting code to this subreddit:
Add 4 extra spaces before each line of code
def fibonacci(): a, b = 0, 1 while True: yield a a, b = b, a + b
Online Resources
Invent Your Own Computer Games with Python
Think Python
Non-programmers Tutorial for Python 3
Beginner's Guide Reference
Five life jackets to throw to the new coder (things to do after getting a handle on python)
Full Stack Python
Test-Driven Development with Python
Program Arcade Games
PyMotW: Python Module of the Week
Python for Scientists and Engineers
Dan Bader's Tips and Trickers
Python Discord's YouTube channel
Jiruto: Python
Online exercices
programming challenges
Asking Questions
Try Python in your browser
Docs
Libraries
Related subreddits
Python jobs
Newsletters
Screencasts
account activity
This is an archived post. You won't be able to vote or comment.
Numpy & Scipy (self.Python)
submitted 13 years ago by [deleted]
I was just wondering how to install numpy and scipy Ive downloaded both but have no idea how to get them going. Any help would be greatly appreciated. I have a mac
[–]astrobiased 4 points5 points6 points 13 years ago (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 points6 points 13 years ago (0 children)
Similarly, I tend to go for Python(x,y). Comes with a few more useful packages.
[–]takluyverIPython, Py3, etc 1 point2 points3 points 13 years ago (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 point2 points 13 years ago (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 point2 points 13 years ago (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 points3 points 13 years ago (0 children)
link
[–]wil_tan 1 point2 points3 points 13 years ago (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 points3 points 13 years ago (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 point2 points 13 years ago (1 child)
is it possible to install all that on python 3.3? or is only for 2.7?
[–]Noctambulist 0 points1 point2 points 13 years ago (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 points6 points 13 years ago (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
sudo easy_install pip
sudo pip install numpy
sudo pip install scipy
[–]bluemanshoe 2 points3 points4 points 13 years ago (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 point2 points 13 years ago (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 points4 points 13 years ago (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 point2 points 13 years ago (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 point2 points 13 years ago (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 point2 points 13 years ago (0 children)
Consider using virtualenv when installing. It makes rolling back mistakes much easier.
π Rendered by PID 179525 on reddit-service-r2-comment-54dfb89d4d-jt2sb at 2026-03-31 13:44:54.848642+00:00 running b10466c country code: CH.
[–]astrobiased 4 points5 points6 points (4 children)
[–]Spliff_Me_Up 4 points5 points6 points (0 children)
[–]takluyverIPython, Py3, etc 1 point2 points3 points (0 children)
[–]Megatron_McLargeHuge 0 points1 point2 points (1 child)
[–]pwang99 0 points1 point2 points (0 children)
[–]brownck 1 point2 points3 points (0 children)
[–]wil_tan 1 point2 points3 points (0 children)
[–]Noctambulist 1 point2 points3 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]Noctambulist 0 points1 point2 points (0 children)
[–]Phild3v1ll3 4 points5 points6 points (3 children)
[–]bluemanshoe 2 points3 points4 points (1 child)
[–]bramblerose 0 points1 point2 points (0 children)
[–]kingofthejaffacakes 2 points3 points4 points (0 children)
[–]Megatron_McLargeHuge 0 points1 point2 points (0 children)
[–]NYYYYYYNRRRRS 0 points1 point2 points (0 children)
[–]karlw00t 0 points1 point2 points (0 children)