3 ms·
Seems like this would have been straight forward with a virtualenv?
by mason55 10y ago
Seems like this would have been straight forward with a virtualenv?
- geofft 10y agoYup. Really, no OS is developer-friendly if you're going to mess with the system Python interpreter, because the system Python interpreter exists to serve system software written in Python. You can easily get yourself into very similar problems with Debian or Fedora or whatever else. Install a virtualenv, and on OS X, maybe install Python from python.org, and then everything works amazingly.
- x0x0 10y agoAfter I learned more that was probably the right thing to do, but I'm not a python dev. I just want to use sklearn, pandas, and associated tools. I'm not sure what the smooth path to doing that is. At various times people recommend macports, brew, anaconda, and so on... Note that compiling numpy from source sucks, and I'd much rather someone else do so.
- tanlermin 10y agoAnaconda. Its the best game in town right now.
- AlexCoventry 10y agoI have found Anaconda to be substantially slower running on OS X than running on the same hardware in a docker container running on boot2docker.
- geofft 10y agoThere are now wheels (binary distributions of Python modules) of numpy, scipy, and scikit-learn for both Linux and Mac OS X, so it should just be a matter of `virtualenv /tmp/v` (or wherever), `source /tmp/v/bin/activate`, `pip install -U pip` to make sure your pip is new enough to handle wheels, and `pip install numpy scipy scikit-learn`. Nothing gets built from source. Unfortunately the same can't (yet) be said for pandas; `pip install pandas` at this point will try to compile it. Actually acquiring virtualenv on OS X seems not to be super straightforward, especially if you want to use the system Python interpreter. The best option seems to be to `brew install python`, and then `pip install virtualenv`. Or download Python from python.org, and maybe get Python 3 while you're at it.
- x0x0 10y agoThank you! I'll give that a whirl.
- solotronics 10y agoone way is to get a standalone python and git clone virtualenv, then use the standalone python to make virtualenv for each project.. this leaves out anything to do with the system python