我只是无法在我的 Mac 上安装 django:/
这里:brew卸载python,brew install python,pip install django,python,import django
nma-2:~ nikolaialeksandrenko$ brew uninstall python
Error: No such keg: /usr/local/Cellar/python
nma-2:~ nikolaialeksandrenko$ brew install python
Warning: You have not agreed to the Xcode license.
Builds will fail! Agree to the license by opening Xcode.app or running:
xcodebuild -license
==> Downloading http://www.python.org/ftp/python/2.7.4/Python-2.7.4.tar.bz2
Already downloaded: /Library/Caches/Homebrew/python-2.7.4.tar.bz2
==> ./configure --prefix=/usr/local/Cellar/python/2.7.4 --enable-ipv6 --datarootdir=/usr/local/Cellar/python/2.7.4/share --datadir=/usr/local/Cellar
==> make
==> make install PYTHONAPPSDIR=/usr/local/Cellar/python/2.7.4
==> make frameworkinstallextras PYTHONAPPSDIR=/usr/local/Cellar/python/2.7.4/share/python
==> Downloading https://pypi.python.org/packages/source/d/distribute/distribute-0.6.38.tar.gz
Already downloaded: /Library/Caches/Homebrew/distribute-0.6.38.tar.gz
==> /usr/local/Cellar/python/2.7.4/bin/python -s setup.py --no-user-cfg install --force --verbose --install-lib=/usr/local/Cellar/python/2.7.4/Frame
==> Downloading https://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/pip-1.3.1.tar.gz
==> /usr/local/Cellar/python/2.7.4/bin/python -s setup.py --no-user-cfg install --force --verbose --install-lib=/usr/local/Cellar/python/2.7.4/Frame
==> Caveats
Homebrew's Python framework
/usr/local/Cellar/python/2.7.4/Frameworks/Python.framework
Python demo
/usr/local/share/python/Extras
Distribute and Pip have been installed. To update them
pip install --upgrade distribute
pip install --upgrade pip
To symlink "Idle" and the "Python Launcher" to ~/Applications
`brew linkapps`
You can install Python packages with (the outdated easy_install or)
`pip install <your_favorite_package>`
They will install into the site-package directory
/usr/local/lib/python2.7/site-packages
Executable python scripts will be put in:
/usr/local/share/python
so you may want to put "/usr/local/share/python" in your PATH, too.
See: https://github.com/mxcl/homebrew/wiki/Homebrew-and-Python
==> Summary
/usr/local/Cellar/python/2.7.4: 5195 files, 80M, built in 102 seconds
nma-2:~ nikolaialeksandrenko$ brew link python
Warning: Already linked: /usr/local/Cellar/python/2.7.4
To relink: brew unlink python && brew link python
nma-2:~ nikolaialeksandrenko$ pip install Django
Requirement already satisfied (use --upgrade to upgrade): Django in /usr/local/lib/python2.7/site-packages
Cleaning up...
nma-2:~ nikolaialeksandrenko$ python
Python 2.7.2 (default, Oct 11 2012, 20:14:37)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named django
>>> import Django
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named Django
>>>