简体   繁体   English

关于Mac OS X上Django开发的问题

[英]Questions about Django development on Mac OS X

I'm new to Mac (as of yesterday), and I have Snow Leopard. 我是Mac的新手(截至昨天),我有Snow Leopard。 I've just easy_install virtualenv, and it doesn't work. 我只是easy_install virtualenv,它不起作用。 I read a couple other SO questions about the same exception I had, and it seems that I need XCode installed. 我读了几个关于我遇到的同样异常的SO问题,似乎我需要安装XCode。 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. 在我走下一个兔子洞之前,为Python相关的东西安装一个3.5Gb Apple专用代码库,谁知道此时还有什么,我想我会在这里停下来找出Macs的Django开发人员的典型代码。

  1. What tools / libraries that are Python/Django specific, but non-project specific do you commonly use? 有哪些特定于Python / Django的工具/库,但您通常使用非项目特定的工具/库?
  2. Is XCode really necessary to use virtualenv (and potentially other things, or is this just one way to solve my issue? XCode是否真的有必要使用virtualenv(以及可能的其他东西,或者这只是解决我的问题的一种方法?
  3. Are there other Mac issues that you've run into with basic Django development? 您是否在基本的Django开发中遇到了其他Mac问题?
  4. Do you have any other tips for a veteran Django dev who is an absolute Mac noob? 对于经验丰富的Django开发者来说,你有什么其他技巧吗?

You will need XCode, yes. 你需要XCode,是的。 You'll need it for any libraries that need compiling, apart from anything else. 除了其他任何东西,你需要它来为任何需要编译的库。

Please don't install MacPorts, though, as recommended by titaniumdecoy. 但是,请不要按照titaniumdecoy的建议安装MacPorts。 It tries to install its own versions of everything, which is unnecessarily confusing, and takes you out of the usual Mac development stack. 它试图安装自己的所有版本,这会造成不必要的混乱,并让你脱离通常的Mac开发堆栈。 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. 我几天前开始使用Mac,我遇到了同样的问题。 You need XCode, yes! 你需要XCode,是的!

Packgers manager, like apt-get, you can try HomeBrew . Packger经理,像apt-get,你可以试试HomeBrew

To develop in django, I use TextMate, with some bundles to django . 为了在django中开发,我使用TextMate,将一些包用于django

To develop in python I use pip , virtualenv and virtualenvwrapper , this is awesome. 要在python中开发我使用pip ,virtualenv和virtualenvwrapper ,这太棒了。

As an iOS developer I can't comment on the specifics of Django development, but the following should help get you started. 作为iOS开发人员,我无法评论Django开发的具体细节,但以下内容应该有助于您入门。

Install macports immediately. 立即安装 macports You can install virtually any unix tool you can think of with a single command, including virtualenv. 您可以使用一个命令安装几乎任何你能想到的unix工具,包括virtualenv。 (Update: Use HomeBrew instead as suggested in other answers: see comments for why.) (更新:使用HomeBrew而不是其他答案中的建议:请参阅注释以了解原因。)

You need to install Xcode to get the Mac OS X developer toolchain (gcc, etc.) unless you prefer to install everything yourself. 你需要安装Xcode来获得Mac OS X开发人员工具链(gcc等),除非你喜欢自己安装。

If you use Eclipse, the Pydev plug-in is one way to go. 如果您使用Eclipse, Pydev插件是一种可行的方法。 TextMate is probably the most popular text editor on the mac. TextMate可能是mac上最受欢迎的文本编辑器。 The Python Wiki has a comprehensive rundown of your options. Python Wiki对您的选项进行了全面的概述。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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