Search code examples
pythonpycharm

Error occurred when installing package ‘Cartopy’


I have installed all libraries we need on this project except ‘’ Cartopy library ‘’ in Pycharm. After some research I thought it might be due to the python version so I tried dowloading the Cartopy Library in about 5 different Python versions and again the Cartopy Library is not installed. After some more research, I thought of changing the version of Pycharm. I dowload version of 2020 and 2021 of Pycharm. Unfortunately i still got the same error : “Error occurred when installing package ‘Cartopy”.

enter image description here


Solution

  • I have encountered a similar issue with another package and the problem wasn't in the IDE but the OS which in my case was mac. I had to install an ubuntu in parallel and migrate the whole project there and it ran perfectly.

    I suggest you use conda instead of pip and if the issue didn't go away check the compatibility with your OS and if this is the issue you can simply install a virtual machine.