> pip install --user cartopy
Collecting cartopy
Using cached Cartopy-0.20.3.tar.gz (10.8 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [45 lines of output]
Traceback (most recent call last):
File "C:\Users\vijtiwar\AppData\Local\Temp\pip-build-env-aheh7c1s\overlay\Lib\site-packages\numpy\core\__init__.py", line 16, in <module>
from . import multiarray
ImportError: DLL load failed: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 58, in <module>
File "C:\Users\vijtiwar\AppData\Local\Temp\pip-build-env-aheh7c1s\overlay\Lib\site-packages\numpy\__init__.py", line 142, in <module>
from . import add_newdocs
File "C:\Users\vijtiwar\AppData\Local\Temp\pip-build-env-aheh7c1s\overlay\Lib\site-packages\numpy\add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "C:\Users\vijtiwar\AppData\Local\Temp\pip-build-env-aheh7c1s\overlay\Lib\site-packages\numpy\lib\__init__.py", line 8, in <module>
from .type_check import *
File "C:\Users\vijtiwar\AppData\Local\Temp\pip-build-env-aheh7c1s\overlay\Lib\site-packages\numpy\lib\type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "C:\Users\vijtiwar\AppData\Local\Temp\pip-build-env-aheh7c1s\overlay\Lib\site-packages\numpy\core\__init__.py", line 26, in <module>
raise ImportError(msg)
ImportError:
Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control). Otherwise reinstall numpy.
Original error was: DLL load failed: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\vijtiwar\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module>
main()
File "C:\Users\vijtiwar\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\vijtiwar\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 130, in get_requi
res_for_build_wheel
return hook(config_settings)
File "C:\Users\vijtiwar\AppData\Local\Temp\pip-build-env-aheh7c1s\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "C:\Users\vijtiwar\AppData\Local\Temp\pip-build-env-aheh7c1s\overlay\Lib\site-packages\setuptools\build_meta.py", line 320, in _get_build_requires
self.run_setup()
File "C:\Users\vijtiwar\AppData\Local\Temp\pip-build-env-aheh7c1s\overlay\Lib\site-packages\setuptools\build_meta.py", line 335, in run_setup
exec(code, locals())
File "<string>", line 60, in <module>
ImportError: NumPy 1.10+ is required to install cartopy.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Asked
Active
Viewed 428 times
0

Michael Delgado
- 13,789
- 3
- 29
- 54
-
What python version are you using? Is it explicitly compatible with the module you want to install? – Daraan Oct 12 '22 at 12:54
-
python v 3.10.8, yes it is compatible. https://scitools.org.uk/cartopy/docs/latest/installing.html – Vijay Tiwari Oct 12 '22 at 13:01
-
Did you install the required dependencies first as listed on the page you linked? These are essential for cartopy – Callum Rollo Oct 12 '22 at 13:29
-
yes i have @CallumRollo – Vijay Tiwari Oct 12 '22 at 15:37
-
Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Oct 12 '22 at 20:51
-
pip is terrible at managing non-python dependencies, including GDAL, especially on windows. you'll need to use pipwin or conda. see e.g. this question about the same issue when installing geopandas: https://stackoverflow.com/questions/54734667/error-installing-geopandas-a-gdal-api-version-must-be-specified-in-anaconda – Michael Delgado Oct 13 '22 at 03:13
1 Answers
0
The root cause here appears to be an incompatible numpy version or broken numpy installation. From your error message:
ImportError: NumPy 1.10+ is required to install cartopy.
You have numpy fixed at too low a version in this environment. I can't say what exactly is holding you to this version of numpy, but you should be able to get around it by building a new environment with e.g. virtualenv, activating it, installing numpy > 1.18 (as per cartopy requirements) then installing cartopy.

Callum Rollo
- 515
- 3
- 12