diff --git a/Python/Module1_GettingStartedWithPython/Informal_Intro_Python.md b/Python/Module1_GettingStartedWithPython/Informal_Intro_Python.md index 715db7ca..1fcf7eb3 100644 --- a/Python/Module1_GettingStartedWithPython/Informal_Intro_Python.md +++ b/Python/Module1_GettingStartedWithPython/Informal_Intro_Python.md @@ -5,7 +5,7 @@ jupyter: extension: .md format_name: markdown format_version: '1.2' - jupytext_version: 1.3.0 + jupytext_version: 1.5.0 kernelspec: display_name: Python 3 language: python @@ -19,6 +19,39 @@ jupyter: # An Informal Introduction to Python + +
+ +**Before You Start This Section**: + +In the following section we will be using IPython or a Jupyter notebook to run our code. +Presently, there is an incompatibility with these programs and a Python package called `jedi`, which typically is responsible for performing auto-completions in our code (when prompted by hitting ``, which we will be doing below). +It is really useful! + +First, let's check to see if we have an incompatible version of `jedi` installed. +In your terminal (before starting a Python/IPython/Jupyter session), run + +``` +conda list +``` + +And look for the line that starts with `jedi` + +``` +jedi 0.18.0 +``` + +If you see that you have version `0.18.0` installed (as above), then you will want to downgrade it. +In the same terminal, run the following command + +``` +conda install jedi=0.17.2 +``` +You should be all set once you have followed the prompts and the installation has completed! + +Note that you will need to repeat this process if you [create a new conda environment](https://www.pythonlikeyoumeanit.com/Module1_GettingStartedWithPython/Installing_Python.html#A-Brief-Introduction-to-Conda-Environments) with IPython/Jupter installed in it. +
+ Now that you have the Anaconda distribution of Python installed on your machine, let's write some simple Python code! We are going to forego writing a full Python script for now, and instead make use of a convenient tool for doing quick code scratchwork. The IPython console was installed as a part of Anaconda; it will allow us to build incrementally off of snippets of code, instead of having to execute an entire script all at once. Let's open an IPython console. Open your terminal if you are a Mac/Linux user, or start `cmd.exe` if you are a Windows user. Now type `ipython` into the console and hit ``. You should see the following display on your screen: diff --git a/Python/Module1_GettingStartedWithPython/Jupyter_Notebooks.md b/Python/Module1_GettingStartedWithPython/Jupyter_Notebooks.md index 0bb42a42..64a636e1 100644 --- a/Python/Module1_GettingStartedWithPython/Jupyter_Notebooks.md +++ b/Python/Module1_GettingStartedWithPython/Jupyter_Notebooks.md @@ -5,7 +5,7 @@ jupyter: extension: .md format_name: markdown format_version: '1.2' - jupytext_version: 1.3.0rc1 + jupytext_version: 1.5.0 kernelspec: display_name: Python 3 language: python @@ -19,6 +19,39 @@ jupyter: # Jupyter Notebooks + +
+ +**Before You Start This Section**: + +In the following section we will be using IPython or a Jupyter notebook to run our code. +Presently, there is an incompatibility with these programs and a Python package called `jedi`, which typically is responsible for performing auto-completions in our code (when prompted by hitting ``, which we will be doing below). +It is really useful! + +First, let's check to see if we have an incompatible version of `jedi` installed. +In your terminal (before starting a Python/IPython/Jupyter session), run + +``` +conda list +``` + +And look for the line that starts with `jedi` + +``` +jedi 0.18.0 +``` + +If you see that you have version `0.18.0` installed (as above), then you will want to downgrade it. +In the same terminal, run the following command + +``` +conda install jedi=0.17.2 +``` +You should be all set once you have followed the prompts and the installation has completed! + +Note that you will need to repeat this process if you [create a new conda environment](https://www.pythonlikeyoumeanit.com/Module1_GettingStartedWithPython/Installing_Python.html#A-Brief-Introduction-to-Conda-Environments) with IPython/Jupter installed in it. +
+ In recent years, the Jupyter Notebook has become a massively popular tool for doing research-oriented work in Python and other languages alike. Its emergence marked a paradigm shift in the way data science is conducted. A Jupyter notebook is similar to the IPython console, but, instead of only being able to work with a single line of code at a time, you can easily edit and re-execute *any* code that had been written in a notebook. Furthermore, you can save a notebook, and thus return to it later. Additionally, a notebook provides many terrific features. For instance, you can embed visualizations of data within a notebook, and write blocks of nicely-formatted text (using the [Markdown syntax](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet)), for presenting and explaining the contents of the notebook. @@ -186,4 +219,4 @@ The Jupyter Notebook does not work exclusively with Python. A "kernel" can be de The ever-growing list of available kernels for use with Jupyter can be found [here](https://github.com/jupyter/jupyter/wiki/Jupyter-kernels). It should be noted that these efforts are not all equally mature. For instance, whereas the Python and Julia kernels are robust, the Haskell kernel cannot run natively on Windows machines, and the C++ kernel is still in early development, as of writing this. ### Jupyter Notebook Support in Visual Studio Code -Native Jupyter notebook support was [recently added to Visual Studio Code](https://devblogs.microsoft.com/python/announcing-support-for-native-editing-of-jupyter-notebooks-in-vs-code/). This means that you can now edit Jupyter notebooks within the [Visual Studio Code IDE](https://www.pythonlikeyoumeanit.com/Module1_GettingStartedWithPython/Getting_Started_With_IDEs_and_Notebooks.html), and that you will benefit from added features like code-completion, debugging, and variable inspection. \ No newline at end of file +Native Jupyter notebook support was [recently added to Visual Studio Code](https://devblogs.microsoft.com/python/announcing-support-for-native-editing-of-jupyter-notebooks-in-vs-code/). This means that you can now edit Jupyter notebooks within the [Visual Studio Code IDE](https://www.pythonlikeyoumeanit.com/Module1_GettingStartedWithPython/Getting_Started_With_IDEs_and_Notebooks.html), and that you will benefit from added features like code-completion, debugging, and variable inspection. diff --git a/Python/Module2_EssentialsOfPython/Basic_Objects.md b/Python/Module2_EssentialsOfPython/Basic_Objects.md index 5a6dd54c..7a2e3f10 100644 --- a/Python/Module2_EssentialsOfPython/Basic_Objects.md +++ b/Python/Module2_EssentialsOfPython/Basic_Objects.md @@ -5,7 +5,7 @@ jupyter: extension: .md format_name: markdown format_version: '1.2' - jupytext_version: 1.3.0rc1 + jupytext_version: 1.5.0 kernelspec: display_name: Python 3 language: python