We'll test your Python installation using the command shell for your OS. The command shell is a text-based version of the Windows Explorer or MacOS Finder; it is how we will run Python in this class.

At the bottom of the page, we explain how to get help if all else fails.


Test #1: Can your command shell find any Python on your computer?

Open a command shell window. (If you've never done this before, see our separate page of command-shell instructions.) In that window, type

python

(and hit return). This should put you in the “Python Interactive Shell”; you can tell this succeeded because a Python "banner" message will be printed out, and you'll get the Python ">>>" (three greater-than signs) prompt.  Here are screenshots from a Mac and a Windows computer.

MacOS Terminal window, where someone has entered the command "python", and the Python "banner" has resulted.  

 

Windows Powershell window, where someone has entered the command "python", and the Python "banner" has resulted.

It is possible that you may see a warning under the Python banner about a conda environment that "has not been activated". If so, please ignore that warning, and for CS1110, you don't need to do the "activation" step that the warning mentions. In other words, your installation has still passed Test #1.
Warning 'This Python interpreter is in a conda environment, but the environment has not been activated' ... (Screenshot courtesy S. Hoogendoorn.)
 

If you see the banner with the words "Python 3." and "Anaconda" in it, you're done with Test #1; go to Test #2.


 

What to do if Test #1 fails

T1-recovery1: Reboot

First, reboot and retry Test #1.

T1-recovery2: Find the Anaconda directory

If your command shell still can't find Python, let's figure out where Anaconda Python 3 went (even though the command shell isn't "seeing" it). Copy-paste the appropriate command for your computer, and then hit return:

(Don't type the command; copy-paste it!  But if you insist: what is just after the first semi-colon is "LS" but in lowercase; it is not "the number 1 followed by an 's'".)

Look carefully at the output.

T1-recovery3:  Adding the necessary directory to your PATH

If you are here, then one of lines that was printed in step T1-recovery2 says something about "Anaconda" or "anaconda". That line could look like one of the following, and the "directory" we want is the part just before the last slash:

output from the "ls" command the Anaconda directory
/opt/anaconda3/bin/python /opt/anaconda3/bin
/Applications/anaconda3/bin/python /Applications/anaconda3/bin
C:\ProgramData\Anaconda3\python.exe C:\ProgramData\Anaconda3

Come to consulting/office hours to have a staff member fix the so-called "path" for your command shell. Or, if you are feeling brave, you can do this yourself:


Test #2: Is it the right version?

Open a new command-shell window, enter the word "python" (then hit return), and look in the Python "banner" for the words "Python 3.7" or "Python 3.8" and "Anaconda".  Here is an example screenshot; it's fine if your "banner" looks different, as long as you see the two words we're looking for.

Screenshot of command shell window with the words "Python 3.8" and "Anaconda" highlighted in the Python "banner"  

If not, your system is running the wrong Python for this class. First, try rebooting.  If the same problem happens, re-install (sorry) and re-test.

Test #3: can you interact with the Python Interactive Shell without it immediately crashing?

Open a new command-shell window, and start Python in it.  At the Python prompt (the three greater-than signs, ">>>"), enter "1+1" 

    >>> 1+1

and hit Return (do not type the >>; it is already there).

If anything other than the appearance of the numeral "2" happens, record the precise output, even if it's a very long error message (copy-and-paste is best) to report the problem to us.

Otherwise, you have a working installation of Anaconda Python 3.7. Hurrah!

To exit the Python Interactive Shell, type quit() or exit()and hit Return.

Still not working?

Post a question on Ed Discussions, or talk to someone at office/consulting hours.