我正在尝试将我的django项目部署到PythonAnywhere,引用https://tutorial.djangogirls.org/en/deploy/。 当我执行这个命令时
pa_autoconfigure_django.py --python=3.6 https://github.com/my_git_url.git
出现以下错误:(实际上有些文本因为太长而被省略)
Traceback (most recent call last):
File "/home/kanchi0914/kanchi0914.pythonanywhere.com/manage.py", line 21, in <module>
main()
File "/home/kanchi0914/kanchi0914.pythonanywhere.com/manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "/home/kanchi0914/.virtualenvs/kanchi0914.pythonanywhere.com/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/home/kanchi0914/.virtualenvs/kanchi0914.pythonanywhere.com/lib/python3.6/site-packages/django/core/management/__init__.py", line 357, in execute
django.setup()
File "/home/kanchi0914/.virtualenvs/kanchi0914.pythonanywhere.com/lib/python3.6/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/kanchi0914/.virtualenvs/kanchi0914.pythonanywhere.com/lib/python3.6/site-packages/django/apps/registry.py", line 91, in populate
app_config = AppConfig.create(entry)
File "/home/kanchi0914/.virtualenvs/kanchi0914.pythonanywhere.com/lib/python3.6/site-packages/django/apps/config.py", line 90, in create
module = import_module(entry)
File "/home/kanchi0914/.virtualenvs/kanchi0914.pythonanywhere.com/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'bootstrap4'
Traceback (most recent call last):
File "/home/kanchi0914/.local/bin/pa_autoconfigure_django.py", line 52, in <module>
django-bootstrap4
和bootstrap4
似乎安装正确。你知道吗
23:45 ~ $ pip3.6 install --user django-bootstrap4
Looking in links: /usr/share/pip-wheels
Requirement already satisfied: django-bootstrap4 in ./.local/lib/python3.6/site-packages (1.0.1)
Requirement already satisfied: beautifulsoup4 in /usr/lib/python3.6/site-packages (from django-bootstrap4) (4.6.0)
我猜这些网站会有用,尝试了一些解决方案,但情况并没有改变。
https://www.tangowithdjango.com/book17/chapters/deploy.html
https://www.pythonanywhere.com/forums/topic/12404/
我在当地的环境中确认了我的项目做得很好。
我该怎么办?
谢谢。你知道吗
我有过一次。如果您使用的是python3,那么可能必须使用pip3。或者pip,如果您使用的是python2。与pip3一起安装的包在python2中不起作用,如果python版本为2,则反之亦然。不确定这是否有用。你知道吗
相关问题 更多 >
编程相关推荐