pip3 установить GDAL на Ma c Catalina (10.15) проблема - PullRequest
0 голосов
/ 14 апреля 2020

Я пытаюсь установить модуль GDAL для python 3 на мою ма c. До сих пор я перепробовал все ответы, доступные онлайн, но ничего не помогло. Я скачал и установил фреймворк GDAL из http://www.kyngchaos.com/software/frameworks/. Затем я скачал GDAL 3.0.4 с их сайта и разархивировал на рабочем столе. После этого я запустил в терминале следующую команду:

pip3 install gdal

В результате возникла ошибка:

Collecting gdal
  Using cached GDAL-3.0.4.tar.gz (577 kB)
    ERROR: Command errored out with exit status 1:
     command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/7y/dxr28f990j11vv883_s9n5mr0000gn/T/pip-install-vc9fxh2n/gdal/setup.py'"'"'; __file__='"'"'/private/var/folders/7y/dxr28f990j11vv883_s9n5mr0000gn/T/pip-install-vc9fxh2n/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 /private/var/folders/7y/dxr28f990j11vv883_s9n5mr0000gn/T/pip-install-vc9fxh2n/gdal/pip-egg-info
         cwd: /private/var/folders/7y/dxr28f990j11vv883_s9n5mr0000gn/T/pip-install-vc9fxh2n/gdal/
    Complete output (72 lines):
    running egg_info
    creating /private/var/folders/7y/dxr28f990j11vv883_s9n5mr0000gn/T/pip-install-vc9fxh2n/gdal/pip-egg-info/GDAL.egg-info
    writing /private/var/folders/7y/dxr28f990j11vv883_s9n5mr0000gn/T/pip-install-vc9fxh2n/gdal/pip-egg-info/GDAL.egg-info/PKG-INFO
    writing dependency_links to /private/var/folders/7y/dxr28f990j11vv883_s9n5mr0000gn/T/pip-install-vc9fxh2n/gdal/pip-egg-info/GDAL.egg-info/dependency_links.txt
    writing top-level names to /private/var/folders/7y/dxr28f990j11vv883_s9n5mr0000gn/T/pip-install-vc9fxh2n/gdal/pip-egg-info/GDAL.egg-info/top_level.txt
    writing manifest file '/private/var/folders/7y/dxr28f990j11vv883_s9n5mr0000gn/T/pip-install-vc9fxh2n/gdal/pip-egg-info/GDAL.egg-info/SOURCES.txt'
    Traceback (most recent call last):
      File "/private/var/folders/7y/dxr28f990j11vv883_s9n5mr0000gn/T/pip-install-vc9fxh2n/gdal/setup.py", line 151, in fetch_config
        p = subprocess.Popen([command, args], stdout=subprocess.PIPE)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 854, in __init__
        self._execute_child(args, executable, preexec_fn, close_fds,
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 1702, in _execute_child
        raise child_exception_type(errno_num, err_msg, err_filename)
    FileNotFoundError: [Errno 2] No such file or directory: '../../apps/gdal-config'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/private/var/folders/7y/dxr28f990j11vv883_s9n5mr0000gn/T/pip-install-vc9fxh2n/gdal/setup.py", line 249, in get_gdal_config
        return fetch_config(option, gdal_config=self.gdal_config)
      File "/private/var/folders/7y/dxr28f990j11vv883_s9n5mr0000gn/T/pip-install-vc9fxh2n/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'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/private/var/folders/7y/dxr28f990j11vv883_s9n5mr0000gn/T/pip-install-vc9fxh2n/gdal/setup.py", line 151, in fetch_config
        p = subprocess.Popen([command, args], stdout=subprocess.PIPE)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 854, in __init__
        self._execute_child(args, executable, preexec_fn, close_fds,
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 1702, in _execute_child
        raise child_exception_type(errno_num, err_msg, err_filename)
    FileNotFoundError: [Errno 2] No such file or directory: 'gdal-config'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/7y/dxr28f990j11vv883_s9n5mr0000gn/T/pip-install-vc9fxh2n/gdal/setup.py", line 450, in <module>
        setup(**setup_kwargs)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 296, in run
        self.find_sources()
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 303, in find_sources
        mm.run()
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 534, in run
        self.add_defaults()
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 570, in add_defaults
        sdist.add_defaults(self)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/command/sdist.py", line 228, in add_defaults
        self._add_defaults_ext()
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/command/sdist.py", line 311, in _add_defaults_ext
        build_ext = self.get_finalized_command('build_ext')
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 299, in get_finalized_command
        cmd_obj.ensure_finalized()
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 107, in ensure_finalized
        self.finalize_options()
      File "/private/var/folders/7y/dxr28f990j11vv883_s9n5mr0000gn/T/pip-install-vc9fxh2n/gdal/setup.py", line 311, in finalize_options
        self.gdaldir = self.get_gdal_config('prefix')
      File "/private/var/folders/7y/dxr28f990j11vv883_s9n5mr0000gn/T/pip-install-vc9fxh2n/gdal/setup.py", line 255, in get_gdal_config
        return fetch_config(option)
      File "/private/var/folders/7y/dxr28f990j11vv883_s9n5mr0000gn/T/pip-install-vc9fxh2n/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'

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Я сейчас очень расстроен, потому что мне нужен gdal для моего проекта и я не могу заставить его работать часами.

...