Open yaoyiren opened 2 years ago
+1
conda install gdal can solve this problem
After installing gdal with conda I get the following error: Any ideas why?
GDAL API version obtained from gdal-config: 3.6.0
ext_options:
{'cython_compile_time_env': {'CTE_GDAL_MAJOR_VERSION': 3,
'CTE_GDAL_MINOR_VERSION': 6,
'CTE_GDAL_PATCH_VERSION': 0},
'define_macros': [],
'extra_compile_args': ['-Wno-unused-parameter', '-Wno-unused-function'],
'extra_link_args': [],
'include_dirs': ['/miniconda/envs/AITOD/lib/python3.7/site-packages/numpy/core/include',
'/miniconda/envs/AITOD/include'],
'libraries': ['gdal'],
'library_dirs': ['/miniconda/envs/AITOD/lib']}
s/miniconda/envs/AITOD/lib/python3.7/site-packages/setuptools/_distutils/extension.py:131: UserWarning: Unknown Extension options: 'cython_compile_time_env'
warnings.warn(msg)
Traceback (most recent call last):
File "s/miniconda/envs/AITOD/lib/python3.7/site-packages/setuptools/sandbox.py", line 156, in save_modules
yield saved
File "/miniconda/envs/AITOD/lib/python3.7/site-packages/setuptools/sandbox.py", line 198, in setup_context
yield
File "miniconda/envs/AITOD/lib/python3.7/site-packages/setuptools/sandbox.py", line 259, in run_setup
_execfile(setup_script, ns)
File "/miniconda/envs/AITOD/lib/python3.7/site-packages/setuptools/sandbox.py", line 46, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-w449yhau/rasterio-1.4a2/setup.py", line 260, in
After installing gdal with conda I get the following error: Any ideas why?
GDAL API version obtained from gdal-config: 3.6.0 ext_options: {'cython_compile_time_env': {'CTE_GDAL_MAJOR_VERSION': 3, 'CTE_GDAL_MINOR_VERSION': 6, 'CTE_GDAL_PATCH_VERSION': 0}, 'define_macros': [], 'extra_compile_args': ['-Wno-unused-parameter', '-Wno-unused-function'], 'extra_link_args': [], 'include_dirs': ['/miniconda/envs/AITOD/lib/python3.7/site-packages/numpy/core/include', '/miniconda/envs/AITOD/include'], 'libraries': ['gdal'], 'library_dirs': ['/miniconda/envs/AITOD/lib']} s/miniconda/envs/AITOD/lib/python3.7/site-packages/setuptools/_distutils/extension.py:131: UserWarning: Unknown Extension options: 'cython_compile_time_env' warnings.warn(msg) Traceback (most recent call last): File "s/miniconda/envs/AITOD/lib/python3.7/site-packages/setuptools/sandbox.py", line 156, in save_modules yield saved File "/miniconda/envs/AITOD/lib/python3.7/site-packages/setuptools/sandbox.py", line 198, in setup_context yield File "miniconda/envs/AITOD/lib/python3.7/site-packages/setuptools/sandbox.py", line 259, in run_setup _execfile(setup_script, ns) File "/miniconda/envs/AITOD/lib/python3.7/site-packages/setuptools/sandbox.py", line 46, in _execfile exec(code, globals, locals) File "/tmp/easy_install-w449yhau/rasterio-1.4a2/setup.py", line 260, in File "/miniconda/envs/AITOD/lib/python3.7/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize cythonize_one(*args) File "s/miniconda/envs/AITOD/lib/python3.7/site-packages/Cython/Build/Dependencies.py", line 1300, in cythonize_one result = compile_single(pyx_file, options, full_module_name=full_module_name) File "/miniconda/envs/AITOD/lib/python3.7/site-packages/Cython/Compiler/Main.py", line 615, in compile_single return run_pipeline(source, options, full_module_name) File "s/miniconda/envs/AITOD/lib/python3.7/site-packages/Cython/Compiler/Main.py", line 539, in run_pipeline err, enddata = Pipeline.run_pipeline(pipeline, source) File "/miniconda/envs/AITOD/lib/python3.7/site-packages/Cython/Compiler/Pipeline.py", line 398, in run_pipeline data = run(phase, data) File "/miniconda/envs/AITOD/lib/python3.7/site-packages/Cython/Compiler/Pipeline.py", line 375, in run return phase(data) File "/miniconda/envs/AITOD/lib/python3.7/site-packages/Cython/Compiler/Pipeline.py", line 32, in parse scope = context.find_module(full_module_name, pos = initial_pos, need_pxd = 0) File "/miniconda/envs/AITOD/lib/python3.7/site-packages/Cython/Compiler/Main.py", line 263, in find_module err, result = self.process_pxd(source_desc, scope, qualified_name) File "/miniconda/envs/AITOD/lib/python3.7/site-packages/Cython/Compiler/Main.py", line 142, in process_pxd result = Pipeline.run_pipeline(pipeline, source_desc) File "/miniconda/envs/AITOD/lib/python3.7/site-packages/Cython/Compiler/Pipeline.py", line 398, in run_pipeline data = run(phase, data) File "/miniconda/envs/AITOD/lib/python3.7/site-packages/Cython/Compiler/Pipeline.py", line 375, in run return phase(data) File "/miniconda/envs/AITOD/lib/python3.7/site-packages/Cython/Compiler/Pipeline.py", line 44, in parse full_module_name=module_name) File "/miniconda/envs/AITOD/lib/python3.7/site-packages/Cython/Compiler/Main.py", line 381, in parse tree = Parsing.p_module(s, pxd, full_module_name) File "Cython/Compiler/Parsing.py", line 3912, in Cython.Compiler.Parsing.p_module File "Cython/Compiler/Parsing.py", line 3931, in Cython.Compiler.Parsing.p_module File "Cython/Compiler/Parsing.py", line 2460, in Cython.Compiler.Parsing.p_statement_list File "Cython/Compiler/Parsing.py", line 2417, in Cython.Compiler.Parsing.p_statement File "Cython/Compiler/Parsing.py", line 2107, in Cython.Compiler.Parsing.p_include_statement File "Cython/Compiler/Parsing.py", line 2110, in Cython.Compiler.Parsing.p_include_statement File "Cython/Compiler/Parsing.py", line 2460, in Cython.Compiler.Parsing.p_statement_list File "Cython/Compiler/Parsing.py", line 2360, in Cython.Compiler.Parsing.p_statement File "/miniconda/envs/AITOD/lib/python3.7/site-packages/Cython/Compiler/Errors.py", line 229, in warning listing_file = threadlocal.cython_errors_listing_file AttributeError: '_thread._local' object has no attribute 'cython_errors_listing_file'
Hello, I also encountered the same problem, have you solved it?
在最后一步安装时报错Setup script exited with ERROR: A GDAL API version must be specified. Provide a path to gdal-config using a GDAL_CONFIG environment variable or use a GDAL_VERSION environment variable.。用了葛总办法都没能解决,能请教一下您的解答吗?