2011-04-14 85 views
2

我目前正在嘗試在Python 2.7.1和Django 1.3之上設置pinax。當在Mac OS X 10.6.7上運行Virtualenv 1.6時,Python 2.7.1

對於前幾個步驟,一個是需要建立的virtualenv,用下面的命令:

$ virtualenv mysite-env
$ source mysite-env/bin/activate
(mysite-env)$

我執行的第一個命令,並創建一個mysite的-ENV目錄,但提供了以下錯誤:

New python executable in mysite-env/bin/python
Error [Errno 2] No such file or directory while executing command install_name_tool -change /Library/Frameworks/.../Versions/2.7/Python @executable_path/../.Python mysite-env/bin/python
Could not call install_name_tool -- you must have Apple's development tools installed Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/bin/virtualenv", line 8, in
load_entry_point('virtualenv==1.6', 'console_scripts', 'virtualenv')()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv.py", line 745, in main
prompt=options.prompt)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv.py", line 836, in create_environment
site_packages=site_packages, clear=clear))
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv.py", line 1098, in install_python
py_executable])
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv.py", line 778, in call_subprocess
cwd=cwd, env=env)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 672, in __ init __ errread, errwrite)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1202, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

執行第二個命令不工作(這是有道理的考慮第一個失敗的):

bash: mysite-env/bin/activate: No such file or directory

我已經閱讀了其他有類似問題的人。

在另一個線程上,有人mentioned there's a bug with Virtualenv on 10.6

在谷歌羣組上,另一人提供了patch for Virtualenv 1.3.3

在這一點上我最好的選擇是什麼?我應該安裝Virtualenv 1.3.3並嘗試修補程序(我知道它不適用於1.6),還是應該嘗試使其與當前版本兼容?有沒有一種替代Virtualenv我可以使用(請記住我由pinax的設置受限制)。

欣賞幫助。

回答

6

No such file or directory while executing command install_name_tool

install_name_tool命令是Mac OS X Developer Tools的一部分。安裝Xcode來獲取它。