在OS X Mavericks上启动Django项目的问题

时间:2014-04-16 04:44:48

标签: python django bash

我通过自制啤酒全新安装了python并将.bashrc中的路径更改为:export PATH=/usr/local/bin:/usr/local/:$PATH

which python给了我/usr/local/bin/python

which pip给了我/usr/local/bin/pip

which django-admin.py给了我/usr/local/bin/django-admin.py

现在,当我用python django-admin.py startproject my_new_project开始我的项目时,我收到了这个错误:

/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file 'django-admin.py': [Errno 2] No such file or directory

为什么要在该位置搜索django-admin.py文件?

有关如何解决此问题的任何想法?

1 个答案:

答案 0 :(得分:1)

我强烈建议使用virtualenv http://www.virtualenv.org/en/latest/

MacOSx应该有很多教程