- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Import error on pyspark and Zeppelin for local module
- Labels:
-
Apache Zeppelin
Created 05-25-2018 11:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am moving to pyspark & zeppelin . I created a two notebook my_settings.py and main.py .
But when I do following in main.py
%pyspark import my_settings ImportError: No module named my_settings
I get import error saying , no modules found.
This works fine on my local server.
I wonder if there's any env setting for this to work.
Created 05-25-2018 03:21 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@bharat sharma Notebooks are not python modules. If you are trying to import a notebook as if it was a python module AFAIK that won't work.
If you are trying to import modules to pyspark application you have different ways to do this. One way is to copy the python file to hdfs and use the following:
%pyspark sc.addPyFile("/user/zeppelin/my_settings.py") import my_settings
HTH
*** If you found this answer addressed your question, please take a moment to login and click the "accept" link on the answer.
Created 05-25-2018 03:21 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@bharat sharma Notebooks are not python modules. If you are trying to import a notebook as if it was a python module AFAIK that won't work.
If you are trying to import modules to pyspark application you have different ways to do this. One way is to copy the python file to hdfs and use the following:
%pyspark sc.addPyFile("/user/zeppelin/my_settings.py") import my_settings
HTH
*** If you found this answer addressed your question, please take a moment to login and click the "accept" link on the answer.
Created 05-28-2018 02:18 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@bharat sharma If the above answer helped addressed your question, please take a moment to login and click the "accept" link on the answer.
