biggstd / py37_teaching

Teaching resources for Python 3.7

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python Teaching Resources

By Tyler Biggs


Getting Started with 3.7

  1. Install Anaconda.

  2. Create a new Python 3.7 environment.

    conda create -n py37 python=3.7
    # conda create -n [environment_name] python=[version]

    Read more about creating environments.

  3. Install Jupyter Lab.

Using Jupyter Lab

Creating a New IPython Kernel:

See the documentation for descriptions of the commands below and more.

# Activate the environment you wish to create a kernel in.
source activate py37
# Install ipykernel.
conda install ipykernel
# Create the kernel.
python -m ipykernel install --user --name py37 --display-name "Python 3.7"

Launching a server:

jupyter lab

Reloading imports:

%load_ext autoreload  # Load the extension.
%autoreload 2         # Reload all modules (except those excluded by %aimport)
                      # every time before executing the Python code typed.

Enabling imports from parent directories:

import sys, os
sys.path.insert(0, os.path.abspath('..'))

General Python

Jupyter Notebook or Lab Specific

Resources

Notebook Examples:

About

Teaching resources for Python 3.7

License:MIT License


Languages

Language:Jupyter Notebook 99.6%Language:Python 0.4%