我在Azure网络应用服务上托管了一个Django应用。我最近删除了skipPythonDeployment
文件,以便我可以从requirements.txt文件中添加自定义包。起初,当我添加了酥脆的包装时,这个工作正常。但在那之后,我想将我的Django安装更新为1.11(应用服务中的默认版本是1.9.4)。
所以这就是我的requirements.txt目前的样子:
django<2
django-crispy-forms==1.6.1
现在,当我尝试将我的提交推送到服务器时(git push azure master
)
我得到以下部署日志:
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 308 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 1 (delta 0)
remote: Updating branch 'master'.
remote: .............................................
remote: Updating submodules.
remote: Preparing deployment for commit id '763167dc3c'.
remote: Generating deployment script.
remote: Running deployment command...
remote: Handling python deployment.
remote: Detected requirements.txt. You can skip Python specific steps
with a .skipPythonDeployment file.
remote: Detecting Python runtime from site configuration
remote: Detected python-2.7
remote: Found compatible virtual environment.
remote: Pip install requirements.
remote: An error has occurred during web site deployment.
remote:
remote: Error - Changes committed to remote repository but deployment to website failed.
To https://username@project.scm.azurewebsites.net:443/b
我试图查看Azures提交日志,但错误几乎相同:
Command: "D:\home\site\deployments\tools\deploy.cmd"
Handling python deployment.
Detected requirements.txt. You can skip Python specific steps with a
.skipPythonDeployment file.
Detecting Python runtime from site configuration
Detected python-2.7
Found compatible virtual environment.
Pip install requirements.
An error has occurred during web site deployment.
\r\nD:\Program Files
(x86)\SiteExtensions\Kudu\65.60816.2969\bin\Scripts\starter.cmd
"D:\home\site\deployments\tools\deploy.cmd"
知道我在这里做错了什么吗?或者我在哪里可以看到实际的错误?
修改
这个github线程(https://github.com/azureappserviceoss/DjangoAzure/issues/2)通过从服务器删除env / azure.env.python-2.7.txt提供了一种解决方法,但它没有解释错误发生的原因。