通过 Cygwin 在 Heroku 上设置 Django 应用程序,安装 pip 时出现权限被拒绝错误
我正在尝试使用 http://devcenter.heroku.com/articles/django 在 Heroku 上部署 Django 应用程序。我只是碰巧使用Windows,所以我一直通过Cygwin 工作(请不要评判我>< )。简而言之,一切都很好,直到我运行“virtualenv venv --distribute”。当我运行它时,无论在哪里运行它,我都会收到权限被拒绝的错误。这是输出:
$ virtualenv venv --distribute
New python executable in venv/bin/python2.6
Not overwriting existing python script venv/bin/python.exe (you must use venv/bi
n/python2.6.exe)
Installing distribute...........................................................
................................................................................
...................................................done.
Installing pip...
Error [Errno 13] Permission denied while executing command /cygdrive/c/Users/D
a...env/bin/easy_install /usr/lib/python2.6/s...pport/pip-1.1.tar.gz
...Installing pip...done.
Traceback (most recent call last):
File "/usr/bin/virtualenv", line 8, in <module>
load_entry_point('virtualenv==1.7.1.2', 'console_scripts', 'virtualenv')()
File "/usr/lib/python2.6/site-packages/virtualenv-1.7.1.2-py2.6.egg/virtualenv
.py", line 928, in main
never_download=options.never_download)
File "/usr/lib/python2.6/site-packages/virtualenv-1.7.1.2-py2.6.egg/virtualenv
.py", line 1042, in create_environment
install_pip(py_executable, search_dirs=search_dirs, never_download=never_dow
nload)
File "/usr/lib/python2.6/site-packages/virtualenv-1.7.1.2-py2.6.egg/virtualenv
.py", line 640, in install_pip
filter_stdout=_filter_setup)
File "/usr/lib/python2.6/site-packages/virtualenv-1.7.1.2-py2.6.egg/virtualenv
.py", line 966, in call_subprocess
cwd=cwd, env=env)
File "/usr/lib/python2.6/subprocess.py", line 623, in __init__
errread, errwrite)
File "/usr/lib/python2.6/subprocess.py", line 1141, in _execute_child
raise child_exception
OSError: [Errno 13] Permission denied
我已经尝试过的事情:
- 以管理员身份运行 Cygwin(Windows 相当于 sudo)
- chmod 777'ed 一切已知的人
- 把我的头撞到墙上
任何帮助将不胜感激! :)
I'm trying to deploy a Django app on Heroku using http://devcenter.heroku.com/articles/django. I just so happen to use Windows, so I've been working via Cygwin (please don't judge me >< ). In short, everything is fine until I run "virtualenv venv --distribute". When I run this, regardless of where I run it, I get a permission denied error. Here's the output:
$ virtualenv venv --distribute
New python executable in venv/bin/python2.6
Not overwriting existing python script venv/bin/python.exe (you must use venv/bi
n/python2.6.exe)
Installing distribute...........................................................
................................................................................
...................................................done.
Installing pip...
Error [Errno 13] Permission denied while executing command /cygdrive/c/Users/D
a...env/bin/easy_install /usr/lib/python2.6/s...pport/pip-1.1.tar.gz
...Installing pip...done.
Traceback (most recent call last):
File "/usr/bin/virtualenv", line 8, in <module>
load_entry_point('virtualenv==1.7.1.2', 'console_scripts', 'virtualenv')()
File "/usr/lib/python2.6/site-packages/virtualenv-1.7.1.2-py2.6.egg/virtualenv
.py", line 928, in main
never_download=options.never_download)
File "/usr/lib/python2.6/site-packages/virtualenv-1.7.1.2-py2.6.egg/virtualenv
.py", line 1042, in create_environment
install_pip(py_executable, search_dirs=search_dirs, never_download=never_dow
nload)
File "/usr/lib/python2.6/site-packages/virtualenv-1.7.1.2-py2.6.egg/virtualenv
.py", line 640, in install_pip
filter_stdout=_filter_setup)
File "/usr/lib/python2.6/site-packages/virtualenv-1.7.1.2-py2.6.egg/virtualenv
.py", line 966, in call_subprocess
cwd=cwd, env=env)
File "/usr/lib/python2.6/subprocess.py", line 623, in __init__
errread, errwrite)
File "/usr/lib/python2.6/subprocess.py", line 1141, in _execute_child
raise child_exception
OSError: [Errno 13] Permission denied
Things I've already tried:
- run Cygwin as an administrator (the Windows-equivalent to sudo)
- chmod 777'ed EVERYTHING known to man
- banged my head against the wall
Any help would be greatly appreciated! :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
嗯,我认为你最好按照我在这里写的说明进行操作:
http://docs.python-guide.org/en/latest/starting/install/win/
一旦一切在正常的 Windows 环境中正常工作,它们也应该在 cygwin 或 msys 中正常工作。
Hmm, I think you'd be best to follow the instructions I've written here:
http://docs.python-guide.org/en/latest/starting/install/win/
Once everything's working properly in a normal windows environment, they should also work properly in cygwin or msys.