What is the best way to setup Django on os X 10.7 Lion?

元气小坏坏 提交于 2019-12-04 16:51:08

Did you install the command-line tools with Xcode 4.3? They are not installed by default. You can install them by going to the Downloads pane in Xcode 4.3's preferences.

Making it way too hard:

First, make sure you install Xcode (available for free in the Mac App Store). It includes all the build tools that might be necessary to compile certain Python packages.

To get easy_install just download setuptools and follow the instructions for installing on Mac OS X at that link.

Once that's done, you can easy_install virtualenv to get a nice segregated environment to work in.

For the MySQL issue you have to edit the site.cfgfile:

mysql_config = /usr/local/mysql/bin/mysql_config

And then:

$ python setup.py build
$ sudo python setup.py install

Try updating XCode and reinstall all global site-packages. You may also want to try pip instead of easy_install.

You can also try to compile with

export ARCHFLAGS='-arch i386 -arch x86_64'

This solved many of my problems in the past when upgrading OSX versions.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!