devs
有人可以告诉我如何在Heroku上安装gdal库,因为在Heroku上部署项目时遇到错误。
我遇到两个错误,如下所示:
错误:命令错误,退出状态为1: 命令:/app/.heroku/python/bin/python -c'import sys,setuptools,tokenize; sys.argv [0] ='“'”'/tmp/pip-install-_s4gq6_a/GDAL/setup.py'“'”'; 文件 ='“'”'/ tmp / pip-install-_s4gq6_a / GDAL / setup.py'“'”'; f = getattr(tokenize,'“'”'open'“'” ',打开)(文件);代码= f.read()。replace('“'”'\ r \ n'“'”,'“'”'\ n'“' “'); f.close(); exec(compile(code, file ,'”'“'exec'”'“'))'egg_info --egg-base / tmp / pip- install-_s4gq6_a / GDAL / pip-egg-info CWD:/ tmp / pip-install-_s4gq6_a / GDAL / 完整输出(75行): 警告:numpy不可用!阵列支持将不会启用 /app/.heroku/python/lib/python3.6/distutils/dist.py:261:UserWarning:未知分发选项:“ long_description_content_type” warnings.warn(msg) 运行egg_info 创建/tmp/pip-install-_s4gq6_a/GDAL/pip-egg-info/GDAL.egg-info 编写/tmp/pip-install-_s4gq6_a/GDAL/pip-egg-info/GDAL.egg-info/PKG-INFO 将dependency_links写入/tmp/pip-install-_s4gq6_a/GDAL/pip-egg-info/GDAL.egg-info/dependency_links.txt 将顶级名称写入/tmp/pip-install-_s4gq6_a/GDAL/pip-egg-info/GDAL.egg-info/top_level.txt 写入清单文件'/tmp/pip-install-_s4gq6_a/GDAL/pip-egg-info/GDAL.egg-info/SOURCES.txt' 追溯(最近一次通话): 文件“ /tmp/pip-install-_s4gq6_a/GDAL/setup.py”,行151,位于fetch_config中 p = subprocess.Popen([命令,参数],stdout = subprocess.PIPE) init 中的文件“ /app/.heroku/python/lib/python3.6/subprocess.py”,第729行 restore_signals,start_new_session) _execute_child中的文件“ /app/.heroku/python/lib/python3.6/subprocess.py”,行1364 提高child_exception_type(errno_num,err_msg,err_filename) FileNotFoundError:[错误2]没有这样的文件或目录:'../../apps/gdal-config':'../../ apps / gdal-config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/pip-install-_s4gq6_a/GDAL/setup.py", line 249, in get_gdal_config
return fetch_config(option, gdal_config=self.gdal_config)
File "/tmp/pip-install-_s4gq6_a/GDAL/setup.py", line 154, in fetch_config
raise gdal_config_error(e)
__main__.gdal_config_error: [Errno 2] No such file or directory: '../../apps/gdal-config': '../../apps/gdal-config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/pip-install-_s4gq6_a/GDAL/setup.py", line 151, in fetch_config
p = subprocess.Popen([command, args], stdout=subprocess.PIPE)
File "/app/.heroku/python/lib/python3.6/subprocess.py", line 729, in __init__
restore_signals, start_new_session)
File "/app/.heroku/python/lib/python3.6/subprocess.py", line 1364, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'gdal-config': 'gdal-config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-_s4gq6_a/GDAL/setup.py", line 450, in <module>
setup(**setup_kwargs)
File "/app/.heroku/python/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/app/.heroku/python/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/app/.heroku/python/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/app/.heroku/python/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/app/.heroku/python/lib/python3.6/site-packages/setuptools/command/egg_info.py", line 278, in run
self.find_sources()
File "/app/.heroku/python/lib/python3.6/site-packages/setuptools/command/egg_info.py", line 293, in find_sources
mm.run()
File "/app/.heroku/python/lib/python3.6/site-packages/setuptools/command/egg_info.py", line 524, in run
self.add_defaults()
File "/app/.heroku/python/lib/python3.6/site-packages/setuptools/command/egg_info.py", line 560, in add_defaults
sdist.add_defaults(self)
File "/app/.heroku/python/lib/python3.6/site-packages/setuptools/command/py36compat.py", line 36, in add_defaults
self._add_defaults_ext()
File "/app/.heroku/python/lib/python3.6/site-packages/setuptools/command/py36compat.py", line 119, in _add_defaults_ext
build_ext = self.get_finalized_command('build_ext')
File "/app/.heroku/python/lib/python3.6/distutils/cmd.py", line 299, in get_finalized_command
cmd_obj.ensure_finalized()
File "/app/.heroku/python/lib/python3.6/distutils/cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "/tmp/pip-install-_s4gq6_a/GDAL/setup.py", line 311, in finalize_options
self.gdaldir = self.get_gdal_config('prefix')
File "/tmp/pip-install-_s4gq6_a/GDAL/setup.py", line 255, in get_gdal_config
return fetch_config(option)
File "/tmp/pip-install-_s4gq6_a/GDAL/setup.py", line 154, in fetch_config
raise gdal_config_error(e)
__main__.gdal_config_error: [Errno 2] No such file or directory: 'gdal-config': 'gdal-config'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.