title: Python script correctly executes every statement, but also returns ModuleNotFoundError
body: <p>I'm running my Python script in Terminal on MacOS. </p>
  
  <p>The script1.py source code: </p>
  
  <pre><code># A first Python script
  import sys              # Load a library module
  print(sys.platform)         
  print(2 ** 100)             # Raise 2 to a power
  x = 'Spam!'
  print(x * 8)                # String repetition
  </code></pre>
  
  <p>The output in the Python interactive session: </p>
  
  <pre><code>&gt;&gt;&gt; import script1.py
  darwin
  1267650600228229401496703205376
  Spam!Spam!Spam!Spam!Spam!Spam!Spam!Spam!
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  ModuleNotFoundError: No module named 'script1.py'; 'script1' is not a package
  </code></pre>
  
  <p>All the statements in the script are executed correctly, but the interpreter returns an error that says the script can't be found. </p>
  
  <p>What's going on here? </p>