PythonAnywhere .py 文件上传不起作用

问题描述 投票:0回答:1

这一切都是从我想部署我的第一个 Flask 应用程序开始的,当我将 .py 文件上传到 pythonanywhere.com 时,我遇到了一个问题:

Permission denied: You do not have write permissions for directory /.

我想知道为什么会出现这种情况以及如何解决。这是我想要上传的文件:

/Users/stepan/Documents/GettingStarted/main.py
。它包含一个简单的 Flask 应用程序,以及一个输出 Hello World 的简单 index.html 文件。

我很困惑为什么会输出这个错误。谢谢你的帮助。

python html flask file-permissions pythonanywhere
1个回答
0
投票

您无法在 PythonAnywhere 上写入 / 。将文件上传到您具有写入权限的位置 - /home/stepan 下的某处

© www.soinside.com 2019 - 2024. All rights reserved.