I am trying to install Shapely library but when I import it, I receive error message:
> from shapely.geometry import Point
No module named 'shapely'
Traceback (most recent call last):
ImportError: No module named 'shapely'
My kernel is :
cat /usr/local/share/jupyter/kernels/pyspark3kernel/kernel.json
{"argv":["python","-m","sparkmagic.kernels.pyspark3kernel.pyspark3kernel", "-f", "{connection_file}"],
"display_name":"PySpark3"
}
I checked where my other libraries are installed:
> import pandas
> pandas.__file__
'/usr/bin/anaconda/envs/py35/lib/python3.5/site-packages/pandas/__init__.py'
Shapely is installed in the same folder:
/usr/bin/anaconda/envs/py35/lib/python3.5/site-packages$ ls *hapely*
shapely:
affinity.py _buildcfg.py ctypes_declarations.py examples geometry geos.py __init__.py linref.py predicates.py __pycache__ strtree.py validation.py wkb.py
algorithms coords.py errors.py ftools.py _geos.pxi impl.py iterops.py ops.py prepared.py speedups topology.py vectorized wkt.py
Shapely-1.6.3.dist-info:
DESCRIPTION.rst INSTALLER METADATA metadata.json RECORD top_level.txt WHEEL
FYI, my spark is over an HD Insight cluster.
What should I do or check to fix this library ? Let me know if you need more details.
EDIT:
I just found that
%%local
from shapely.geometry import Point
is working perfectly well... therefore, i think my lib is not installed on the cluster but is installed localy. How can I deploy it on the cluster ?