无法在Dropbox文件夹中执行heroku的Python教程 [英] Unable to do heroku's Python tutorial within Dropbox folder
问题描述
所以我在命令行中做了这个(不使用sudo导致的权限错误):
sudo pip install virtualenv
但是,当我做virtualenv venv --distribute(我也试过用sudo),我得到以下错误:
venv / bin / python中的新python可执行文件
安装分发................................................ ............................................. .................................................. .................................................. .................................................. ...........................................完成。
安装pip ...
错误[Errno 2]执行命令时没有这样的文件或目录/Users/AndyFang/Drop...env/bin/easy_install /Library/Python/2.7 / ... pport / pip-1.1.tar.gz
...安装pip ... done。
Traceback(最近一次调用最后一次):
在< module>中,第8行的文件/ usr / local / bin / virtualenv
load_entry_point('virtualenv == 1.7.1.2','console_scripts','virtualenv')()
文件/Library/Python/2.7/site-packages/virtualenv.py,第928行,在主
never_download = options.never_download)
文件/Library/Python/2.7/site-packages/virtualenv.py,第1042行,在create_environment中
install_pip(py_executable,search_dirs = search_dirs ,never_download = never_download)
文件/Library/Python/2.7/site-packages/virtualenv.py,第640行,在install_pip
filter_stdout = _filter_setup)
文件/ Library / Python /2.7/site-packages/virtualenv.py,第966行,在call_subprocess
cwd = cwd,env = env)
文件/System/Library/Frameworks/Python.framework/Versions/2.7/ lib / python2.7 / subprocess.py,第672行,在__init__
errread,errwrite)
文件/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /subprocess.py,行1202,在_execute_child
举起child_exception
OSError:[Errno 2]没有这样的文件或目录
不知道该怎么做。看起来我没有在我的Mac上安装easy_install,但我确实拥有它......我不确定这笔交易是什么?
编辑:我也是只是尝试使用easy_install安装virtualenv,但我得到了完全相同的错误。 这是因为您的Dropbox同步文件夹的路径中有一个空间。EDIT2: OK this is weird. (I can't answer my own question, so I just put it as another edit to the question. I think it has something to do with the fact that I tried to do this installation within a Dropbox-synced directory. I got this to work on my Desktop. Can anyone explain why this is the case?
Original question:
I'm trying to do Heroku's Python setup tutorial (http://devcenter.heroku.com/articles/python), on my Mac OS X (Lion), but I get caught up with the step of creating a virtualenv.
So what I did was this in the command line (not using sudo caused permissions error):
sudo pip install virtualenv
But then, when I do "virtualenv venv --distribute" (I also tried with sudo), I get the following error:
New python executable in venv/bin/python
Installing distribute..............................................................................................................................................................................................................................................................................................done.
Installing pip...
Error [Errno 2] No such file or directory while executing command /Users/AndyFang/Drop...env/bin/easy_install /Library/Python/2.7/...pport/pip-1.1.tar.gz
...Installing pip...done.
Traceback (most recent call last):
File "/usr/local/bin/virtualenv", line 8, in <module>
load_entry_point('virtualenv==1.7.1.2', 'console_scripts', 'virtualenv')()
File "/Library/Python/2.7/site-packages/virtualenv.py", line 928, in main
never_download=options.never_download)
File "/Library/Python/2.7/site-packages/virtualenv.py", line 1042, in create_environment
install_pip(py_executable, search_dirs=search_dirs, never_download=never_download)
File "/Library/Python/2.7/site-packages/virtualenv.py", line 640, in install_pip
filter_stdout=_filter_setup)
File "/Library/Python/2.7/site-packages/virtualenv.py", line 966, in call_subprocess
cwd=cwd, env=env)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 672, in __init__
errread, errwrite)
File "/System/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
Not really sure what to do. It seemed like I didn't have easy_install on my Mac, but I do have it... I'm not sure what the deal is?
EDIT: I also just tried installing virtualenv with easy_install, but I get the exact same error.
If your problem is the same as mine, then it's because there's a space somewhere in the path to your Dropbox-synced folder.
这篇关于无法在Dropbox文件夹中执行heroku的Python教程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!