<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: pyspark not working in my jupyter notebook in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/pyspark-not-working-in-my-jupyter-notebook/m-p/316230#M226756</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;pyspark is still not recognised in my jupyter notebook for instance when I do:&lt;/P&gt;&lt;P&gt;import pyspark or anything related i get an error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also installed many versions of python. I try open a new notebook with different python version but still facing trouble.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here copy and paste for my .bashrc file. Please can you tell me where my error is :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# .bashrc # User specific aliases and functions alias rm='rm -i' alias cp='cp -i' alias mv='mv -i' # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi export SPARK_CLASSPATH=/usr/share/java/postgresql-jdbc-8.4.704.jar export PYSPARK_DRIVER_PYTHON_OPTS="notebook" export PYSPARK_DRIVER_PYTHON=jupyter export SPARK_CLASSPATH=/usr/share/java/postgresql-jdbc-8.4.704.jar export PYSPARK_DRIVER_PYTHON_OPTS="notebook" export PYSPARK_DRIVER_PYTHON=jupyter export PATH=$PATH:/home/cloudera/anaconda3/bin # added by Anaconda3 4.0.0 installer export PATH="/home/cloudera/anaconda3/bin:$PATH" export SPARK_CLASSPATH=/usr/share/java/postgresql-jdbc-8.4.704.jar export PYSPARK_DRIVER_PYTHON_OPTS="notebook" export PYSPARK_DRIVER_PYTHON=jupyter export SPARK_CLASSPATH=/usr/share/java/postgresql-jdbc-8.4.704.jar export PYSPARK_DRIVER_PYTHON_OPTS="notebook" export PYSPARK_DRIVER_PYTHON=jupyter&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Wed, 12 May 2021 13:14:40 GMT</pubDate>
    <dc:creator>bsaad</dc:creator>
    <dc:date>2021-05-12T13:14:40Z</dc:date>
    <item>
      <title>pyspark not working in my jupyter notebook</title>
      <link>https://community.cloudera.com/t5/Support-Questions/pyspark-not-working-in-my-jupyter-notebook/m-p/316159#M226720</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am doing this course on Cloudera which requires installation of anaconda, spark. After many attempts, i have successfully installed all packages but i still get this error in my notebook.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;import pyspark&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;import pyspark&lt;/P&gt;&lt;P&gt;---------------------------------------------------------------------------&lt;BR /&gt;ImportError Traceback (most recent call last)&lt;BR /&gt;&amp;lt;ipython-input-7-c15ae3402d12&amp;gt; in &amp;lt;module&amp;gt;()&lt;BR /&gt;----&amp;gt; 1 import pyspark&lt;/P&gt;&lt;P&gt;/usr/lib/spark/python/pyspark/__init__.py in &amp;lt;module&amp;gt;()&lt;BR /&gt;39&lt;BR /&gt;40 from pyspark.conf import SparkConf&lt;BR /&gt;---&amp;gt; 41 from pyspark.context import SparkContext&lt;BR /&gt;42 from pyspark.rdd import RDD&lt;BR /&gt;43 from pyspark.files import SparkFiles&lt;/P&gt;&lt;P&gt;/usr/lib/spark/python/pyspark/context.py in &amp;lt;module&amp;gt;()&lt;BR /&gt;22 from tempfile import NamedTemporaryFile&lt;BR /&gt;23&lt;BR /&gt;---&amp;gt; 24 from pyspark import accumulators&lt;BR /&gt;25 from pyspark.accumulators import Accumulator&lt;BR /&gt;26 from pyspark.broadcast import Broadcast&lt;/P&gt;&lt;P&gt;/usr/lib/spark/python/pyspark/accumulators.py in &amp;lt;module&amp;gt;()&lt;BR /&gt;89 import select&lt;BR /&gt;90 import struct&lt;BR /&gt;---&amp;gt; 91 import SocketServer&lt;BR /&gt;92 import threading&lt;BR /&gt;93 from pyspark.cloudpickle import CloudPickler&lt;/P&gt;&lt;P&gt;ImportError: No module named 'SocketServer'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone please help me ? Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2021 12:00:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/pyspark-not-working-in-my-jupyter-notebook/m-p/316159#M226720</guid>
      <dc:creator>bsaad</dc:creator>
      <dc:date>2021-05-11T12:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: pyspark not working in my jupyter notebook</title>
      <link>https://community.cloudera.com/t5/Support-Questions/pyspark-not-working-in-my-jupyter-notebook/m-p/316230#M226756</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;pyspark is still not recognised in my jupyter notebook for instance when I do:&lt;/P&gt;&lt;P&gt;import pyspark or anything related i get an error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also installed many versions of python. I try open a new notebook with different python version but still facing trouble.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here copy and paste for my .bashrc file. Please can you tell me where my error is :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# .bashrc # User specific aliases and functions alias rm='rm -i' alias cp='cp -i' alias mv='mv -i' # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi export SPARK_CLASSPATH=/usr/share/java/postgresql-jdbc-8.4.704.jar export PYSPARK_DRIVER_PYTHON_OPTS="notebook" export PYSPARK_DRIVER_PYTHON=jupyter export SPARK_CLASSPATH=/usr/share/java/postgresql-jdbc-8.4.704.jar export PYSPARK_DRIVER_PYTHON_OPTS="notebook" export PYSPARK_DRIVER_PYTHON=jupyter export PATH=$PATH:/home/cloudera/anaconda3/bin # added by Anaconda3 4.0.0 installer export PATH="/home/cloudera/anaconda3/bin:$PATH" export SPARK_CLASSPATH=/usr/share/java/postgresql-jdbc-8.4.704.jar export PYSPARK_DRIVER_PYTHON_OPTS="notebook" export PYSPARK_DRIVER_PYTHON=jupyter export SPARK_CLASSPATH=/usr/share/java/postgresql-jdbc-8.4.704.jar export PYSPARK_DRIVER_PYTHON_OPTS="notebook" export PYSPARK_DRIVER_PYTHON=jupyter&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 13:14:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/pyspark-not-working-in-my-jupyter-notebook/m-p/316230#M226756</guid>
      <dc:creator>bsaad</dc:creator>
      <dc:date>2021-05-12T13:14:40Z</dc:date>
    </item>
  </channel>
</rss>

