Live data from Hacker News

Installing and setting up OS X Mavericks for Python development

blog.kristian.io

11–20 of 65 posts

Re: Installing and setting up OS X Mavericks for Python development

#11
post #7

From the post: "Homebrew helps you compile different kinds of software on your mac, making it feel almost as easy as apt-get'ing a package on e.g. ubuntu. " (emphasis added) This is something I've noticed from using both OSX and Linux for the past few years — unless software is available as a drop-and-install package, it's universally _easier_ to install in Linux* than it is in OSX. Given the market for OSX and the a…

Yes and no. Having done professional and personal development for OS X and two linux distributions (Fedora / Gentoo) it is most definately easier on Linux if you want to just hack together some software for your own use. As soon as you want to distribute that software however, the advantage often disappears - you can't use the package manager version of a lib because you need a feature in a later version, or because you need a different option activated during compile. Or you have a patch for said library that was refused upstream.

If anything like this happens in a dependency of your module, you're probably going to have to recompile all of the downstream dependencies by hand, or risk breaking your development system.

To avoid all of this you end up compiling static versions of the libs from your dependencies, and linking them statically to your module. This is particularly true if you don't want to be at the mercy of upgrades to those dependencies in your distribution that break your code.

Looking at things from the other side, there have been various package managers for OS X that give some of the ease-of-development available thanks to yum or apt-get. At the moment homebrew seems to be getting quite a bit of traction, and has addressed many of the pain points that predecessors such as MacPorts and fink have had, making OS X decidely more linux-like when you're writing the software without plans for distribution.

Re: Installing and setting up OS X Mavericks for Python development

#12
post #9
post #5

[deleted]

When I was running the developer version of Mavericks, the site_packages weren't preserved, which meant pip & setuptools were broken, so I had to reinstall them like so: http://www.pip-installer.org/en/latest/installing.html then upgrading pip and virtualenvwrapper: $ sudo easy_install pip $ sudo pip install --upgrade virtualenvwrapper If that doesn't do the trick, you might need to install the Xcode command line too…

Wouldn't it be better to not install eggs into the system path and instead into site-packages on a per-user basis? Or, quite frankly, not use the system python at all?

Re: Installing and setting up OS X Mavericks for Python development

#13
another neat trick: - install brew cask https://github.com/phinze/homebrew-cask to have homebrew manage other apps: chrome, alfred ..

Sadly it seems that many python packages have big issues with overloaded =, which means that brew can't compile many tools I need. so If you need anything relying on boost you might want to delay the update

Re: Installing and setting up OS X Mavericks for Python development

#14
post #6

I dont code in Phyton, but i think that you should add xcode commands line tools in this tutorial. http://www.computersnyou.com/2025/2013/06/install-command-li...

I think Homebrew requires this? Or at least some of the basic packages I installed with it did....

Re: Installing and setting up OS X Mavericks for Python development

#15
post #7

From the post: "Homebrew helps you compile different kinds of software on your mac, making it feel almost as easy as apt-get'ing a package on e.g. ubuntu. " (emphasis added) This is something I've noticed from using both OSX and Linux for the past few years — unless software is available as a drop-and-install package, it's universally _easier_ to install in Linux* than it is in OSX. Given the market for OSX and the a…

Yes and no. Having done professional and personal development for OS X and two linux distributions (Fedora / Gentoo) it is most definately easier on Linux if you want to just hack together some software for your own use. As soon as you want to distribute that software however, the advantage often disappears - you can't use the package manager version of a lib because you need a feature in a later version, or because…

I'm a long-time macports user, and brew just blew me away with how much less work it made me do! (even just in terms of other source builds finding libraries by themselves - a real boon.)

Re: Installing and setting up OS X Mavericks for Python development

#16
post #2

Be wary of using case sensitive FS. Many apps simply don't work on case sensitive. Maybe they've fixed it, but not long ago the whole Adobe suite just wouldn't work on case sensitive EXT FS. You should use a convention for your filenames anyway. Eg in Python you always use lower case.

The major reason behind the switch is that I recently had to rename a file, that someone accidentally comitted with an uppercase letter. We had to do it on another machine. It's a valid concern though.

At my previous employer, where most developers use Linux, there was a README and a readme with different content in the same directory in a git repository. Loads of fun on case-insensitive OS X, since git always believed some data was removed ;).

Re: Installing and setting up OS X Mavericks for Python development

#18
post #10

just use a vm (eg vagrant) or a remote server and be platform independent!

Why use extra RAM on Vagrant when your Mac OS X is a full-featured Unix OS? Don't get me wrong, I know that the more complicated your setup gets, the more it would make sense to use Vagrant - but if you're just developing a CRUD Flask / Django app with PostgreSQL, you might as well just install Postgres.app and develop locally.
Post reply on HN