Set up your laptop with the CS 104 computing environment#

For Macs#

Install Python#

We’ll be using the Python programming language, version 3. You must install Python3. We suggest you do a fresh install even if you have an older python version available.

  • Go to https://www.python.org/downloads/. It should give you a download specific to your machine. Be sure the download option’s version number starts with 3.9 or 3.10. Once downloaded, click and install the package. Provide your Mac password, if necessary.

  • After the installation, a Finder window opens to the Python 3.9 applications. It contains two useful scripts we suggest you run: (a) Double-click on Install Certificates.command. This will be helpful in establishing secure connections. When it is finished, dismiss the window. (b) Double-click on Update Shell Profile.command. This will make sure this version of Python is the preferred version.

  • After the installation, exit out of all applications, including the Terminal.

  • Reopen the terminal window by typing “Terminal” into spotlight search. Then run the following command:

    python3 --version 
    

    This should report the version you just installed, which will likely be Python 3.9.1 or something similar.

  • Now, use pip3 to install the Python packages we use with the following installation commands.

    pip3 install jupyterlab
    pip3 install cs104@git+https://github.com/cs104williams/cs104-toolbox
    pip3 install datascience@git+https://github.com/cs104williams/cs104-datascience
    pip3 install numpy 
    

Run Jupyter Lab#

In the terminal window run the following command

jupyter lab 

For Windows 10#

Install Python#

  • Install Python from the Windows Store by visiting the Python 3.10 for Windows page.

  • Proceed to install with the default options for any choices you have during installation.

  • Open a DOS command prompt by clicking Start, typing cmd, typing cmd, and pressing Enter. Then type

    python3 --version
    

    This should report the version you just installed, which will likely be Python 3.10 or something similar.

  • Now, use pip3 to install the Python packages we use with the following installation commands.

    pip3 install jupyterlab
    pip3 install cs104@git+https://github.com/cs104williams/cs104-toolbox
    pip3 install datascience@git+https://github.com/cs104williams/cs104-datascience
    pip3 install numpy 
    

Run Jupyter Lab#

Open a DOS command prompt and type:

jupyter lab