Skip to content
Sign upLog in
← Back to Community
EnvCommandError when installing package
Profile icon
maxbesong

I'm attempting to add the Cartopy package for a Python script I'm writing. When I search for it in the "Packages" menu on the left side, I can find it there. But when I click the "+" button to add it, I get the error in the screenshot below.

image

I'm new to using packages in Python (mainly just used Matplotlib prior to this, and I didn't need to actually search for it in the packages menu, so this part is new to me). Is there a way I can get this package added to my project?

Answered by AntarcticaAdv [earned 5 cycles]
View Answer
Voters
Profile icon
CorruptedIphone
Profile icon
maxbesong
Comments
hotnewtop
Profile icon
AntarcticaAdv

Cartopy is a bit complex, it requires some native packages before it can be installed. Switch to the Shell tab next to Console and run install-pkg libproj-dev libgeos-dev. Once that is done try installing Cartopy again.

Profile icon
maxbesong

@AntarcticaAdv
Thank you very much--Cartopy was added with no issues after following your advice.

If anyone reads this in the future, I encountered a segmentation fault error when running a script with Cartopy. This was fixed after following the instructions here: https://stackoverflow.com/questions/52374356/cartopy-examples-produce-a-segmentation-fault

Profile icon
iVictory2004

For me it only returns:
bash: install-pkg: command not found