Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ubuntu, Anaconda: Cannot import python shapely package

Shapely Import problem Related to MAC OS X

I installed shapely using sudo apt-get install python-shapely.

I am using Python 2.7.8 |Anaconda 2.1.0 (64-bit)| with ubuntu 14.04 LTS (64 bit)

After successful installation, when I try to import it from ipython it gives me an import error. ImportError: No module named shapely

How do I fix this?

like image 442
Sounak Avatar asked Nov 18 '25 21:11

Sounak


1 Answers

That happens because apt-get installs packages to the system default python, under /usr/python2.7/lib/site-packages. Anaconda has its own package manager, conda, which you might want to use in your case. conda install shapely should do the trick.

like image 54
Andrey Sobolev Avatar answered Nov 21 '25 11:11

Andrey Sobolev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!