title: FileNotFoundError while trying to use PySpark to start a database related job
body: <p>Im trying to make a chat bot that reads some databases through panda on Jupyter Notebook through Anaconda, all of that works perfectly, however when i try to do it with PySpark i get &quot;FileNotFoundError&quot;, along with some others that seems to be related. I have looked around and consulted with someone about it and it seems to be an issue with my configuration and the Enviromental Variables, however im quite a newbie with Jupyter Notebook and Anaconda, so i dont know where to configure it or something.</p>
  <pre><code>import requests
  import pandas as pd
  import numpy as np
  import random
  from pyspark.sql import SparkSession
  spark = SparkSession.builder.appName('Chat Bot').getOrCreate()
  
  FileNotFoundError                         Traceback (most recent call last)
  ~\AppData\Local\Temp/ipykernel_12668/4175016484.py in &lt;module&gt;
  ----&gt; 1 spark = SparkSession.builder.appName('Chat Bot').getOrCreate()
  
  C:\ProgramData\Anaconda3\lib\site-packages\pyspark\sql\session.py in getOrCreate(self)
      226                             sparkConf.set(key, value)
      227                         # This SparkContext may be an existing one.
  --&gt; 228                         sc = SparkContext.getOrCreate(sparkConf)
      229                     # Do not update `SparkConf` for existing `SparkContext`, as it's shared
      230                     # by all sessions.
  
  C:\ProgramData\Anaconda3\lib\site-packages\pyspark\context.py in getOrCreate(cls, conf)
      390         with SparkContext._lock:
      391             if SparkContext._active_spark_context is None:
  --&gt; 392                 SparkContext(conf=conf or SparkConf())
      393             return SparkContext._active_spark_context
      394 
  
  C:\ProgramData\Anaconda3\lib\site-packages\pyspark\context.py in __init__(self, master, appName, sparkHome, pyFiles, environment, batchSize, serializer, conf, gateway, jsc, profiler_cls)
      142                 &quot; is not allowed as it is a security risk.&quot;)
      143 
  --&gt; 144         SparkContext._ensure_initialized(self, gateway=gateway, conf=conf)
      145         try:
      146             self._do_init(master, appName, sparkHome, pyFiles, environment, batchSize, serializer,
  
  C:\ProgramData\Anaconda3\lib\site-packages\pyspark\context.py in _ensure_initialized(cls, instance, gateway, conf)
      337         with SparkContext._lock:
      338             if not SparkContext._gateway:
  --&gt; 339                 SparkContext._gateway = gateway or launch_gateway(conf)
      340                 SparkContext._jvm = SparkContext._gateway.jvm
      341 
  
  C:\ProgramData\Anaconda3\lib\site-packages\pyspark\java_gateway.py in launch_gateway(conf, popen_kwargs)
       99             else:
      100                 # preexec_fn not supported on Windows
  --&gt; 101                 proc = Popen(command, **popen_kwargs)
      102 
      103             # Wait for the file to appear, or for the process to exit, whichever happens first.
  
  C:\ProgramData\Anaconda3\lib\subprocess.py in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, user, group, extra_groups, encoding, errors, text, umask)
      949                             encoding=encoding, errors=errors)
      950 
  --&gt; 951             self._execute_child(args, executable, preexec_fn, close_fds,
      952                                 pass_fds, cwd, env,
      953                                 startupinfo, creationflags, shell,
  
  C:\ProgramData\Anaconda3\lib\subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_gid, unused_gids, unused_uid, unused_umask, unused_start_new_session)
     1418             # Start the process
     1419             try:
  -&gt; 1420                 hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
     1421                                          # no special security
     1422                                          None, None,
  
  FileNotFoundError: [WinError 2] The system cannot find the file specified
  </code></pre>
  <p>I have access to Amazon's SageMaker and i get the same error there, so i definately lack something here.</p>