简体   繁体   中英

Questions about Django development on Mac OS X

I'm new to Mac (as of yesterday), and I have Snow Leopard. I've just easy_install virtualenv, and it doesn't work. I read a couple other SO questions about the same exception I had, and it seems that I need XCode installed. Before I go down a rabbit hole, installing a 3.5Gb Apple-specific code library for something Python related, and who knows what else at this point, I figured I'd stop by here and find out what's typical for Django developers with Macs.

  1. What tools / libraries that are Python/Django specific, but non-project specific do you commonly use?
  2. Is XCode really necessary to use virtualenv (and potentially other things, or is this just one way to solve my issue?
  3. Are there other Mac issues that you've run into with basic Django development?
  4. Do you have any other tips for a veteran Django dev who is an absolute Mac noob?

You will need XCode, yes. You'll need it for any libraries that need compiling, apart from anything else.

Please don't install MacPorts, though, as recommended by titaniumdecoy. It tries to install its own versions of everything, which is unnecessarily confusing, and takes you out of the usual Mac development stack. A much better package installation tool is homebrew , which uses the built-in tools to install software via a series of recipes. It's excellent.

I started use Mac a couple days ago and I have same problem. You need XCode, yes!

Packgers manager, like apt-get, you can try HomeBrew .

To develop in django, I use TextMate, with some bundles to django .

To develop in python I use pip , virtualenv and virtualenvwrapper , this is awesome.

As an iOS developer I can't comment on the specifics of Django development, but the following should help get you started.

Install macports immediately. You can install virtually any unix tool you can think of with a single command, including virtualenv. (Update: Use HomeBrew instead as suggested in other answers: see comments for why.)

You need to install Xcode to get the Mac OS X developer toolchain (gcc, etc.) unless you prefer to install everything yourself.

If you use Eclipse, the Pydev plug-in is one way to go. TextMate is probably the most popular text editor on the mac. The Python Wiki has a comprehensive rundown of your options.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM