0

I'm learning python for data analysis. I have OS X Mavericks. I would like to install most needed modules to have a scientific python environment. I know that the most common ones are numpy, matplotlib, scipy, but I was wondering if there are others that could also be needed in the future.

So what I need is the following: a macport command with all the ports that can install such stuff for me all at once.

Edit: of course include python and ipython in the command for newcomers as well.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Jack Twain
  • 6,273
  • 15
  • 67
  • 107
  • 1
    Apologies for not answering the question directly but I would (personally) recommend that you use Homebrew and not Macports. Macports seems to have had many problems in the past. If you're just starting up your python environment, it would be a good chance to switch. – oLas Mar 06 '14 at 22:55
  • @oLas what kind of issues you got with macports? – Jack Twain Mar 06 '14 at 23:20

2 Answers2

1

I suggest to consider Anaconda as a stand alone Python scientific environment. Installation is very smooth and there is no interaction with other Python installations on the Mac.

jolvi
  • 4,463
  • 2
  • 15
  • 13
0

Further to my comment above, assuming you are not currently heavily dependent on Macports as a package manager, I would point you in the direction of this guide Installing scientific Python on Mac OS X. There are many similar guides with the same general theme:

  1. Use Homebrew to install Python (handles directives and links very easily)
  2. Use pip the built-in Python package manager to install scipy, iPython etc.

I fiddled with MacPorts and self compiling stuff for a while before settling for this and it really is easy. Easy to set up and, more importantly, easy to manage after installation!

I should add that, if you chose to use MacPorts over Homebrew, it is still recommended that you use pip to manage/install your Python packages. So there isn't a single MacPorts command for that.

oLas
  • 1,171
  • 1
  • 9
  • 17
  • I already installed the followings with macports: sudo port install python27 python33 py27-numpy py27-scipy py27-matplotlib py27-tornado py27-zmq py27-ipython py27-cython py27-scikit-learn py27-virtualenv virtualenv_select py27-nose-testconfig py27-pep8 pep8_select py27-pip g95 – Jack Twain Mar 06 '14 at 23:07
  • Is it too late? If I want to switch back to using Homebrew, what to do?! – Jack Twain Mar 06 '14 at 23:08
  • Fear not, again, I had the same issue. See this question [python homebrew by default](http://stackoverflow.com/questions/5157678/python-homebrew-by-default) - just need to ensure that after you download python with homebrew, you point to the right folders. It's a good idea to remove MacPorts too. – oLas Mar 06 '14 at 23:12