Python 部署到heroku时没有名为importlib.util的模块
我正在向Heroku部署Python 部署到heroku时没有名为importlib.util的模块,python,django,heroku,Python,Django,Heroku,我正在向Heroku部署Django应用程序。一切正常,但当我使用git-push-heroku-master将代码推入heroku-master时,它安装了所有要求,但最后显示 remote: cwd: /tmp/pip-install-eh43np6w/importlib/ remote: Complete output (11 lines): remote: Traceback (most recent call
Django应用程序。一切正常,但当我使用git-push-heroku-master将代码推入heroku-master
时,它安装了所有要求,但最后显示
remote: cwd: /tmp/pip-install-eh43np6w/importlib/
remote: Complete output (11 lines):
remote: Traceback (most recent call last):
remote: File "<string>", line 1, in <module>
remote: File "/app/.heroku/python/lib/python3.9/site-packages/setuptools/__init__.py", line 5, in <module>
remote: import distutils.core
remote: File "/app/.heroku/python/lib/python3.9/distutils/core.py", line 16, in <module>
remote: from distutils.dist import Distribution
remote: File "/app/.heroku/python/lib/python3.9/distutils/dist.py", line 19, in <module>
remote: from distutils.util import check_environ, strtobool, rfc822_escape
remote: File "/app/.heroku/python/lib/python3.9/distutils/util.py", line 9, in <module>
remote: import importlib.util
remote: ModuleNotFoundError: No module named 'importlib.util'
我试了很多次,但它一直显示出这个错误
任何帮助都将不胜感激
提前谢谢。请确保包含这些文件
runtime.txt
Procfile
requirements.txt
-runtime.txt包含您的python版本
-requirements.txt包含您正在使用的软件包
-Procfile包含一些超出我知识范围的内容,因此我建议在Heroku文档中查看一下,我使用了Python-3.7.5
,但是Heroku不支持它,所以我选择了3.8.5。我已经创建了runtime.txt我已经创建了Procfile我已经创建了requirements.txt使用python-3.7.10
如果不起作用,请使用整个构建日志更新帖子。
No Python version was specified. Using the buildpack default: python-3.9.5
runtime.txt
Procfile
requirements.txt