简体   繁体   English

通过Cygwin在Heroku上设置Django应用,安装pip时出现权限拒绝错误

[英]Setting up Django app on Heroku via Cygwin giving permission denied error when installing pip

I'm trying to deploy a Django app on Heroku using http://devcenter.heroku.com/articles/django . 我正在尝试使用http://devcenter.heroku.com/articles/django在Heroku上部署Django应用。 I just so happen to use Windows, so I've been working via Cygwin (please don't judge me >< ). 我只是碰巧使用Windows,所以我一直在通过Cygwin工作(请不要判断我> <)。 In short, everything is fine until I run "virtualenv venv --distribute". 简而言之,一切都很好,直到我运行“ 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) 以管理员身份运行Cygwin(Windows等同于sudo)
  • chmod 777'ed EVERYTHING known to man chmod 777'ed人所皆知
  • banged my head against the wall 把我的头撞在墙上

Any help would be greatly appreciated! 任何帮助将不胜感激! :) :)

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/ http://docs.python-guide.org/zh-CN/latest/starting/install/win/

Once everything's working properly in a normal windows environment, they should also work properly in cygwin or msys. 在正常的Windows环境中一切正常运行后,它们也应在cygwin或msys中正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM