Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

How to import Numpy and other libraries when using Zeppelin with Livy3?

avatar
Explorer

Hi everyone,

Currently trying to create a pySpark application that requires Numpy.
I have tried to install it on every worker and master nodes but without success since the notebook always returns the error that it does not exist.

Had anyone done this? I believe this should be something rather easy, but my experience is probably not enough to get it at this point.

Thanks

1 REPLY 1

avatar
Super Collaborator

If you're using Conda

Create the environment
conda create -n pyspark_env python=3.9 numpy

Activate it
conda activate pyspark_env

Tell Spark to use it

export PYSPARK_PYTHON=$(which python)
export PYSPARK_DRIVER_PYTHON=$(which python)