2
我最近安裝了OS X Mavericks。我可以使用以前創建的虛擬環境,但我有麻煩創建一個新問題:安裝OS X Mavericks後使用mkvirtualenv時遇到問題
Christophers-MacBook-Pro-2:~ christopherspears$ mkvirtualenv bottle_todo
-bash: /usr/local/bin/virtualenv: /usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directory
我看着到/ usr/local/bin目錄/的virtualenv:
#!/usr/local/opt/python/bin/python2.7
# EASY-INSTALL-ENTRY-SCRIPT: 'virtualenv==1.10.1','console_scripts','virtualenv'
__requires__ = 'virtualenv==1.10.1'
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.exit(
load_entry_point('virtualenv==1.10.1', 'console_scripts', 'virtualenv')()
)
果然路徑/ usr /local/opt/python/bin/python2.7不會退出。早前,我有這個問題:
Terminal issue with virtualenvwrapper after Mavericks Upgrade
我嘗試更新的virtualenv無濟於事:
christohersmbp2:~ christopherspears$ pip install virtualenv
Requirement already satisfied (use --upgrade to upgrade): virtualenv in /Library/Python/2.7/site-packages
Cleaning up...
christohersmbp2:~ christopherspears$ pip install --upgrade virtualenv
Requirement already up-to-date: virtualenv in /Library/Python/2.7/site-packages
Cleaning up...
christohersmbp2:~ christopherspears$ mkvirtualenv test
-bash: /usr/local/bin/virtualenv: /usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directory
什麼呢'這python'對你說? – phoet
我得到/ usr/bin/python –
嘗試重新安裝virtualenv。它應該指向那個pyton – phoet