第一篇文章和新程序员。我正在尝试使用适用于 python 2.7 的kartograph.org 框架在 python 和 javascript 中制作一个小型交互式地图,但我遇到了很多首先阻止我的问题。1-我尝试通过安装框架
sudo pip install https://github.com/kartograph/kartograph.py/zipball/master -r https://raw.github.com/kartograph/kartograph.py/master/requirements.txt
但它给了我这个错误
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
Collecting https://github.com/kartograph/kartograph.py/zipball/master
Using cached https://github.com/kartograph/kartograph.py/zipball/master
Collecting GDAL
Using cached GDAL-3.1.0.tar.gz (592 kB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python2 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-Jq7Uii/GDAL/setup.py'"'"'; __file__='"'"'/tmp/pip-install-Jq7Uii/GDAL/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-6poFbM
cwd: /tmp/pip-install-Jq7Uii/GDAL/
Complete output (49 lines):
WARNING: numpy not available! Array support will not be enabled
running egg_info
creating /tmp/pip-pip-egg-info-6poFbM/GDAL.egg-info
writing requirements to /tmp/pip-pip-egg-info-6poFbM/GDAL.egg-info/requires.txt
writing /tmp/pip-pip-egg-info-6poFbM/GDAL.egg-info/PKG-INFO
writing top-level names to /tmp/pip-pip-egg-info-6poFbM/GDAL.egg-info/top_level.txt
writing dependency_links to /tmp/pip-pip-egg-info-6poFbM/GDAL.egg-info/dependency_links.txt
writing manifest file '/tmp/pip-pip-egg-info-6poFbM/GDAL.egg-info/SOURCES.txt'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-Jq7Uii/GDAL/setup.py", line 477, in <module>
setup(**setup_kwargs)
File "/home/roxas/.local/lib/python2.7/site-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/home/roxas/.local/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 296, in run
self.find_sources()
File "/home/roxas/.local/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 303, in find_sources
mm.run()
File "/home/roxas/.local/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 534, in run
self.add_defaults()
File "/home/roxas/.local/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 570, in add_defaults
sdist.add_defaults(self)
File "/home/roxas/.local/lib/python2.7/site-packages/setuptools/command/py36compat.py", line 36, in add_defaults
self._add_defaults_ext()
File "/home/roxas/.local/lib/python2.7/site-packages/setuptools/command/py36compat.py", line 119, in _add_defaults_ext
build_ext = self.get_finalized_command('build_ext')
File "/usr/lib/python2.7/distutils/cmd.py", line 312, in get_finalized_command
cmd_obj.ensure_finalized()
File "/usr/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
self.finalize_options()
File "/tmp/pip-install-Jq7Uii/GDAL/setup.py", line 320, in finalize_options
self.gdaldir = self.get_gdal_config('prefix')
File "/tmp/pip-install-Jq7Uii/GDAL/setup.py", line 263, in get_gdal_config
raise gdal_config_error(traceback_string + '\n' + msg)
__main__.gdal_config_error: Traceback (most recent call last):
File "/tmp/pip-install-Jq7Uii/GDAL/setup.py", line 257, in get_gdal_config
return fetch_config(option)
File "/tmp/pip-install-Jq7Uii/GDAL/setup.py", line 160, in fetch_config
raise gdal_config_error, e""")
File "<string>", line 4, in <module>
gdal_config_error: [Errno 2] No such file or directory
Could not find gdal-config. Make sure you have installed the GDAL native library and development headers.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
我试图从
pip install GDAL
但一直回复同样的错误。如果有人帮助我,我会很高兴