如何将Django应用程序覆盖到Pythonywhere?

如何将Django应用程序覆盖到Pythonywhere?,python,django,pythonanywhere,Python,Django,Pythonanywhere,在第二次将Django应用程序部署到Pythonywhere之后(我在VS代码中重新编辑和覆盖,并进行git推送),我得到了以下错误 WARNING: Package(s) not found: django Traceback (most recent call last): File "/home/hogehohe/.local/bin/pa_autoconfigure_django.py", line 47, in <module> main(a

在第二次将Django应用程序部署到Pythonywhere之后(我在VS代码中重新编辑和覆盖,并进行git推送),我得到了以下错误

WARNING: Package(s) not found: django
Traceback (most recent call last):
  File "/home/hogehohe/.local/bin/pa_autoconfigure_django.py", line 47, in <module>
    main(arguments['<git-repo-url>'], arguments['--domain'], arguments['--python'], nuke=arguments.get('--nuke'))
  File "/home/hogehohe/.local/bin/pa_autoconfigure_django.py", line 36, in main
    project.update_settings_file()
  File "/home/hogehohe/.local/lib/python3.6/site-packages/pythonanywhere/django_project.py", line 74, in update_settings_file
    new_django = version.parse(self.virtualenv.get_version("django")) >= version.parse("3.1")
  File "/home/hogehohe/.local/lib/python3.6/site-packages/pythonanywhere/virtualenvs.py", line 32, in get_version
    output = subprocess.check_output(commands).decode()
  File "/usr/lib/python3.6/subprocess.py", line 356, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/home/hogehohe/.virtualenvs/hogehohe.pythonanywhere.com/bin/pip', 'show', 'django']' returned non-zero exit status 1.

第一次部署成功,但第二次部署未成功。我不知道原因以及如何覆盖它…

您的项目中需要有一个requirements.txt文件,用于指定应用程序所需的软件包。我猜你的第一个项目中有一个包含django,而你的第二个项目中没有。

你的项目中需要有一个requirements.txt文件,用于指定应用程序所需的软件包。我猜您的第一个项目包含django,而您的第二个项目没有。

谢谢,我可以继续执行此命令。pip freeze>requirements.txt I overwrite requirements.txt。我想没关系,但又发生了一个错误。当你有时间的时候,请检查下面的内容好吗?谢谢,我可以继续执行这个命令了。pip freeze>requirements.txt I overwrite requirements.txt。我想没关系,但又发生了一个错误。你有时间的时候可以在下面查一下吗?
$ pa_autoconfigure_django.py https://github.com/[user_name]/[project_name].git --nuke