简体   繁体   中英

Issue with starting a Django project on OS X Mavericks

I did a fresh install of of python via home brew and changed my path in .bashrc to this: export PATH=/usr/local/bin:/usr/local/:$PATH

which python gives me /usr/local/bin/python

which pip gives me /usr/local/bin/pip

which django-admin.py gives me /usr/local/bin/django-admin.py

Now, when I go to start my project with python django-admin.py startproject my_new_project , I am given this error:

/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

Why is it searching in that location for the django-admin.py file?

Any ideas on how to fix this?

I would highly recommend using virtualenv http://www.virtualenv.org/en/latest/

There should be plenty of tutorials out there for MacOSx

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