Heroku部署中的问题- numpy.distutils.system_info.NotFoundError:没有找到



我正在尝试在Heroku上部署一个基于flask的应用程序。
我将我的GitHub存储库连接到Heroku平台,并从存储库中尝试将其推送到部署。
installing build dependencies之前一切正常。在那之后,我得到了一些错误。

-----> Building on the Heroku-20 stack
-----> Determining which buildpack to use for this app
-----> Python app detected
-----> No Python version was specified. Using the buildpack default: python-3.9.6
To use a different version, see: https://devcenter.heroku.com/articles/python-runtimes
-----> Installing python-3.9.6
-----> Installing pip 20.2.4, setuptools 47.1.1 and wheel 0.36.2
-----> Installing SQLite3
-----> Installing requirements with pip
Collecting click==8.0.1
Downloading click-8.0.1-py3-none-any.whl (97 kB)
Collecting colorama==0.4.4
Downloading colorama-0.4.4-py2.py3-none-any.whl (16 kB)
Collecting Cython==0.29.23
Downloading Cython-0.29.23-cp39-cp39-manylinux1_x86_64.whl (1.9 MB)
Collecting Flask==2.0.1
Downloading Flask-2.0.1-py3-none-any.whl (94 kB)
Collecting Flask-Cors==3.0.10
Downloading Flask_Cors-3.0.10-py2.py3-none-any.whl (14 kB)
Collecting importlib-metadata==4.6.1
Downloading importlib_metadata-4.6.1-py3-none-any.whl (17 kB)
Collecting itsdangerous==2.0.1
Downloading itsdangerous-2.0.1-py3-none-any.whl (18 kB)
Collecting Jinja2==3.0.1
Downloading Jinja2-3.0.1-py3-none-any.whl (133 kB)
Collecting joblib==1.0.1
Downloading joblib-1.0.1-py3-none-any.whl (303 kB)
Collecting MarkupSafe==2.0.1
Downloading MarkupSafe-2.0.1-cp39-cp39-manylinux2010_x86_64.whl (30 kB)
Collecting numpy==1.19.5
Downloading numpy-1.19.5-cp39-cp39-manylinux2010_x86_64.whl (14.9 MB)
Collecting pandas==1.3.1
Downloading pandas-1.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.7 MB)
Collecting python-dateutil==2.8.2
Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting pytz==2021.1
Downloading pytz-2021.1-py2.py3-none-any.whl (510 kB)
Collecting scikit-learn==0.22.2.post1
Downloading scikit-learn-0.22.2.post1.tar.gz (6.9 MB)
Collecting scipy==1.4.1
Downloading scipy-1.4.1.tar.gz (24.6 MB)
Installing build dependencies: started
Installing build dependencies: still running...
Installing build dependencies: still running...
Installing build dependencies: still running...
Installing build dependencies: still running...
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /app/.heroku/python/bin/python /app/.heroku/python/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpzehqvl85
cwd: /tmp/pip-install-u8xhvmc8/scipy
Complete output (171 lines):
setup.py:418: UserWarning: Unrecognized setuptools command ('dist_info --egg-base /tmp/pip-modern-metadata-5w54x3w9'), proceeding with generating Cython sources and expanding templates
warnings.warn("Unrecognized setuptools command ('{}'), proceeding with "
Running from scipy source directory.
lapack_opt_info:
lapack_mkl_info:
customize UnixCCompiler
libraries mkl_rt not found in ['/app/.heroku/python/lib', '/usr/local/lib', '/usr/lib64', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
NOT AVAILABLE

openblas_lapack_info:
customize UnixCCompiler
customize UnixCCompiler
libraries openblas not found in ['/app/.heroku/python/lib', '/usr/local/lib', '/usr/lib64', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
NOT AVAILABLE

openblas_clapack_info:
customize UnixCCompiler
customize UnixCCompiler
libraries openblas,lapack not found in ['/app/.heroku/python/lib', '/usr/local/lib', '/usr/lib64', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
NOT AVAILABLE

flame_info:
customize UnixCCompiler
libraries flame not found in ['/app/.heroku/python/lib', '/usr/local/lib', '/usr/lib64', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
NOT AVAILABLE

atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
customize UnixCCompiler
libraries lapack_atlas not found in /app/.heroku/python/lib
customize UnixCCompiler
libraries tatlas,tatlas not found in /app/.heroku/python/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
libraries tatlas,tatlas not found in /usr/local/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib64
customize UnixCCompiler
libraries tatlas,tatlas not found in /usr/lib64
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib
customize UnixCCompiler
libraries tatlas,tatlas not found in /usr/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu
customize UnixCCompiler
libraries tatlas,tatlas not found in /usr/lib/x86_64-linux-gnu
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
NOT AVAILABLE

atlas_3_10_info:
customize UnixCCompiler
libraries lapack_atlas not found in /app/.heroku/python/lib
customize UnixCCompiler
libraries satlas,satlas not found in /app/.heroku/python/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
libraries satlas,satlas not found in /usr/local/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib64
customize UnixCCompiler
libraries satlas,satlas not found in /usr/lib64
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib
customize UnixCCompiler
libraries satlas,satlas not found in /usr/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu
customize UnixCCompiler
libraries satlas,satlas not found in /usr/lib/x86_64-linux-gnu
<class 'numpy.distutils.system_info.atlas_3_10_info'>
NOT AVAILABLE

atlas_threads_info:
Setting PTATLAS=ATLAS
customize UnixCCompiler
libraries lapack_atlas not found in /app/.heroku/python/lib
customize UnixCCompiler
libraries ptf77blas,ptcblas,atlas not found in /app/.heroku/python/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib64
customize UnixCCompiler
libraries ptf77blas,ptcblas,atlas not found in /usr/lib64
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib
customize UnixCCompiler
libraries ptf77blas,ptcblas,atlas not found in /usr/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu
customize UnixCCompiler
libraries ptf77blas,ptcblas,atlas not found in /usr/lib/x86_64-linux-gnu
<class 'numpy.distutils.system_info.atlas_threads_info'>
NOT AVAILABLE

atlas_info:
customize UnixCCompiler
libraries lapack_atlas not found in /app/.heroku/python/lib
customize UnixCCompiler
libraries f77blas,cblas,atlas not found in /app/.heroku/python/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
libraries f77blas,cblas,atlas not found in /usr/local/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib64
customize UnixCCompiler
libraries f77blas,cblas,atlas not found in /usr/lib64
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib
customize UnixCCompiler
libraries f77blas,cblas,atlas not found in /usr/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu
customize UnixCCompiler
libraries f77blas,cblas,atlas not found in /usr/lib/x86_64-linux-gnu
<class 'numpy.distutils.system_info.atlas_info'>
NOT AVAILABLE

accelerate_info:
NOT AVAILABLE

lapack_info:
customize UnixCCompiler
libraries lapack not found in ['/app/.heroku/python/lib', '/usr/local/lib', '/usr/lib64', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
NOT AVAILABLE

/tmp/pip-build-env-jxsfl6_h/overlay/lib/python3.9/site-packages/numpy/distutils/system_info.py:1712: UserWarning:
Lapack (http://www.netlib.org/lapack/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [lapack]) or by setting
the LAPACK environment variable.
if getattr(self, '_calc_info_{}'.format(lapack))():
lapack_src_info:
NOT AVAILABLE

/tmp/pip-build-env-jxsfl6_h/overlay/lib/python3.9/site-packages/numpy/distutils/system_info.py:1712: UserWarning:
Lapack (http://www.netlib.org/lapack/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [lapack_src]) or by setting
the LAPACK_SRC environment variable.
if getattr(self, '_calc_info_{}'.format(lapack))():
NOT AVAILABLE

Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
main()
File "/app/.heroku/python/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/app/.heroku/python/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 133, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "/tmp/pip-build-env-jxsfl6_h/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 166, in prepare_metadata_for_build_wheel
self.run_setup()
File "/tmp/pip-build-env-jxsfl6_h/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 258, in run_setup
super(_BuildMetaLegacyBackend,
File "/tmp/pip-build-env-jxsfl6_h/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 150, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 540, in <module>
setup_package()
File "setup.py", line 536, in setup_package
setup(**metadata)
File "/tmp/pip-build-env-jxsfl6_h/overlay/lib/python3.9/site-packages/numpy/distutils/core.py", line 137, in setup
config = configuration()
File "setup.py", line 435, in configuration
raise NotFoundError(msg)
numpy.distutils.system_info.NotFoundError: No lapack/blas resources found.
----------------------------------------
ERROR: Command errored out with exit status 1: /app/.heroku/python/bin/python /app/.heroku/python/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpzehqvl85 Check the logs for full command output.
!     Push rejected, failed to compile Python app.
!     Push failed

以下是应用程序的要求

click==8.0.1
colorama==0.4.4
Cython==0.29.23
Flask==2.0.1
Flask-Cors==3.0.10
importlib-metadata==4.6.1
itsdangerous==2.0.1
Jinja2==3.0.1
joblib==1.0.1
MarkupSafe==2.0.1
numpy==1.19.5
pandas==1.3.1
python-dateutil==2.8.2
pytz==2021.1
scikit-learn==0.22.2.post1
scipy==1.4.1
six==1.16.0
threadpoolctl==2.2.0
typing-extensions==3.10.0.0
Werkzeug==2.0.1
zipp==3.5.0

这些是flask web应用程序的需求。它在我的本地服务器上工作得很好。但是当我尝试在heroku平台上部署时,它最终出现了这些错误。

帮助我解决这些错误,我想在Heroku中部署

我有完全相同的错误。在我的情况下,删除requirements.txt中指定的脚本版本很有帮助。我在使用其他包时遇到了错误,我通过删除版本号来解决每个错误。

参考:Heroku上传-找不到满足要求的版本anaconda-client==1.4.0

相关内容

  • 没有找到相关文章

最新更新