[英]change python path of easy_install
經過多次嘗試使用Macport之后,我使用了Mac,因此決定切換到常規python路徑,所以現在我的python路徑是
/Library/Frameworks/Python.framework/Versions/2.7/bin/python
但是,當我安裝django時,我的mac stil使用Apple已安裝的python,我如何告訴easy_install使用上述python路徑而不是apple install python:
[~/mysite/djangosite]$sudo easy_install django==1.5
Searching for django==1.5
Best match: Django 1.5
Processing Django-1.5-py2.6.egg
Django 1.5 is already the active version in easy-install.pth
Installing django-admin.py script to /usr/local/bin
Using /Library/Python/2.6/site-packages/Django-1.5-py2.6.egg
Processing dependencies for django==1.5
Finished processing dependencies for django==1.5
anu@localhost:[~/mysite/djangosite]$which python
/Library/Frameworks/Python.framework/Versions/2.7/bin/python
我嘗試了哪種easy_install
來查看使用了什么easy_install
及其/usr/bin/easy_install
我也進入/Library/Frameworks/Python.framework/Versions/2.7/bin
來檢查easy_install,但在那兒找不到easy_install。
localhost:[/Library/Frameworks/Python.framework/Versions/2.7/bin]$ls
2to3 idle2 pydoc2.7 python2 python2.7-32 pythonw2 smtpd.py
2to3-2 idle2.7 python python2-32 python2.7-config pythonw2-32 smtpd2.7.py
2to3-2.7 pydoc python-32 python2-config pythonw pythonw2.7 smtpd2.py
idle pydoc2 python-config python2.7 pythonw-32 pythonw2.7-32
/Library/Frameworks/Python.framework/Versions/2.7/bin/easy_install*
提供任何內容,
執行一個which easy_install
並確保您在/Library/Frameworks/Python.framework/Versions/2.7/bin
下獲得一個,或者直接在該目錄下運行easy_install
。 之后,您應該在所需目錄下安裝django。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.