Skip to content
Snippets Groups Projects
Commit fc8a74f3 authored by LOUIS TYRRELL OLIPHANT's avatar LOUIS TYRRELL OLIPHANT
Browse files

Merge branch 'Yunhao_windows_instructions_changes' into 'main'

windows instructions

See merge request cdis/cs/courses/cs220/cs220-lecture-material!4
parents 4b52054e c0ec5b54
No related branches found
No related tags found
1 merge request!4windows instructions
Showing
with 92 additions and 15 deletions
installation_instructions/windows/images/image-19.png

10.7 KiB | W: | H:

installation_instructions/windows/images/image-19.png

27.8 KiB | W: | H:

installation_instructions/windows/images/image-19.png
installation_instructions/windows/images/image-19.png
installation_instructions/windows/images/image-19.png
installation_instructions/windows/images/image-19.png
  • 2-up
  • Swipe
  • Onion skin
installation_instructions/windows/images/image-28.png

37.9 KiB

installation_instructions/windows/images/image-29.png

6.49 KiB

installation_instructions/windows/images/image-30.png

45.6 KiB

installation_instructions/windows/images/image-31.png

45.5 KiB

installation_instructions/windows/images/image-32.png

19.9 KiB

installation_instructions/windows/images/image-33.png

17.2 KiB

installation_instructions/windows/images/image-34.png

4.18 KiB

installation_instructions/windows/images/image-35.png

586 KiB

installation_instructions/windows/images/image-36.png

664 KiB

installation_instructions/windows/images/image-37.png

9.75 KiB

installation_instructions/windows/images/image-6.png

26 KiB | W: | H:

installation_instructions/windows/images/image-6.png

164 KiB | W: | H:

installation_instructions/windows/images/image-6.png
installation_instructions/windows/images/image-6.png
installation_instructions/windows/images/image-6.png
installation_instructions/windows/images/image-6.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -7496,7 +7496,7 @@ a.anchor-link {
<p>Download and run the installer. On the "Install for:" page select "Just Me (recommended)" and then accept the default installation folder.</p>
<p><img alt="Install for Just Me" src="images/image-4.png"/>
<img alt="Keep Default Install Location" src="images/image-5.png"/></p>
<p>On the Advanced Installation Options, keep the default first and third checkmarks to create a shortcut and register Anaconda3 as the default for Python.</p>
<p>On the Advanced Installation Options, keep the default first and third checkmarks to create a shortcut and register Anaconda3 as the default for Python. Keep the second checkmarks to allow using conda in command prompt (which we will learn about it later).</p>
<p><img alt="Keep Default Checkmarks" src="images/image-6.png"/></p>
<p>Finish running the installer.</p>
<p><img alt="Final Installation Screen" src="images/image-10.png"/></p>
......@@ -7504,24 +7504,47 @@ a.anchor-link {
<p><img alt="Command to Install Proper Version of Python" src="images/image-14.png"/></p>
<p><img alt="Proceed to Installation" src="images/image-13.png"/></p>
<p><img alt="Command to Check Python Version" src="images/image-15.png"/></p>
<h2 id="3.-Enable-the-debugger">3. Enable the debugger<a class="anchor-link" href="#3.-Enable-the-debugger"></a></h2><p>One feature of Jupyter Lab that we will use this semester is the debugger. It is disabled by default. To enable it you will need to edit a text file. Start by opening the file explorer
<img alt="File Explorer Icon" src="images/image-18.png"/> and in the sidebar, click on <em>home</em>.</p>
<p><img alt="Home option in File Explorer" src="images/image-19.png"/></p>
<p>Browse inside the <code>anaconda3</code> folder to the <code>share\jupyter\kernels\python3\</code> folder and double click to open the kernel.json file in Notepad.</p>
<h2 id="3.-Enable-the-debugger">3. Enable the debugger<a class="anchor-link" href="#3.-Enable-the-debugger"></a></h2><p>One feature of Jupyter Lab that we will use this semester is the debugger. It is disabled by default. To enable it you will need to edit a text file. Start by opening the file explorer</p>
<p><img alt="File Explorer Icon" src="images/image-18.png"/> and in the sidebar, click on your C disk <em>(C:)</em>.</p>
<p><img alt="C: disk option in File Explorer" src="images/image-19.png"/></p>
<p>Browse inside the <code>Users</code> folder and select the one that looks like your name (i.e. 'yunha' in the image below).</p>
<p><img alt="Users folder" src="images/image-28.png"/></p>
<p><img alt="user folder" src="images/image-29.png"/></p>
<p>If you install anaconda correctly, you should found a folder name <code>anaconda3</code> in this folder.</p>
<p><img alt="inside user folder" src="images/image-30.png"/></p>
<p>Browse inside the <code>anaconda3</code> folder. Scroll down a little bit and you should find a folder name <code>share</code>.</p>
<p><img alt="share" src="images/image-31.png"/></p>
<p>Click <code>share</code>, then click <code>jupyter</code>,<code>kernels</code>, <code>python3</code> to the <code>share\jupyter\kernels\python3\</code> folder.</p>
<p><img alt="jupyter" src="images/image-32.png"/></p>
<p><img alt="kernels" src="images/image-33.png"/></p>
<p><img alt="python3" src="images/image-34.png"/></p>
<p>Double click to open the kernel.json file in Notepad.</p>
<p><img alt="Content of anaconda3/share/jupyter/kernels/python3 folder" src="images/image-20.png"/></p>
<p><img alt="Open kernel.json file with Noepad" src="images/image-21.png"/></p>
<p><img alt="Open kernel.json file with Notepad" src="images/image-21.png"/></p>
<p>The line that reads <code>"debugger": false</code> needs to be changed to be <code>"debugger": true</code> and then save the file.</p>
<p><img alt="Original content of kernel.json" src="images/image-16.png"/>
<img alt="New content of kernel.json" src="images/image-17.png"/></p>
<h2 id="4.-Associate-Notebook-Files-with-Jupyter-Lab">4. Associate Notebook Files with Jupyter Lab<a class="anchor-link" href="#4.-Associate-Notebook-Files-with-Jupyter-Lab"></a></h2><p>The files that we will be working with this semester are called <em>Jupyter Notebook</em> files. These files have a file extension of <code>.ipynb</code>. You can make it so that when you double click on a file that ends in <code>.ipynb</code> that it will be opened by Jupyter Lab. Download the <a href="../test_configuration.ipynb" target="_blank" download>Test Configuration Notebook</a> which we will use to change the file assocation. Then open your Downloads folder in the File Explorer. At the top of the window, click on the <strong>View -&gt; Show -&gt; File name extensions</strong> option so you can see the file extension of the notebook file.</p>
<h2 id="4.-Associate-Notebook-Files-with-Jupyter-Lab">4. Associate Notebook Files with Jupyter Lab<a class="anchor-link" href="#4.-Associate-Notebook-Files-with-Jupyter-Lab"></a></h2><p>The files that we will be working with this semester are called <em>Jupyter Notebook</em> files. These files have a file extension of <code>.ipynb</code>. You can make it so that when you double click on a file that ends in <code>.ipynb</code> that it will be opened by Jupyter Lab. Download the <a download="" href="../test_configuration.ipynb" target="_blank">Test Configuration Notebook</a> which we will use to change the file assocation. Then open your Downloads folder in the File Explorer. At the top of the window, click on the <strong>View -&gt; Show -&gt; File name extensions</strong> option so you can see the file extension of the notebook file.</p>
<p><img alt="Show File Name Extensions" src="images/image-22.png"/></p>
<p>Now double click to try and open the notebook file. It will ask you to select an app to open the file. Click on the <strong>Choose an app on your PC</strong> and browse to your username and open the anaconda3/Scripts folder and select <code>jupyter-lab.exe</code>.</p>
<p>Now double click to try and open the notebook file. It will ask you to select an app to open the file. Click on the <strong>Choose an app on your PC</strong></p>
<p>Now similar to part 3, browse to your username and open the <code>anaconda3</code> folder. But now after you click inside the <code>anaconda3</code> folder, click into the <code>Scripts</code> folder instead of the <code>share</code> folder. The <code>Scripts</code> folder should be right on top of the <code>share</code> folder. Inside the <code>Scripts</code> folder select <code>jupyter-lab.exe</code>.</p>
<p><img alt="Select an App to open .ipynb files" src="images/image-23.png"/></p>
<p><img alt="Scripts folder inside ananconda3 folder" src="images/image-24.png"/></p>
<p><img alt="jupyter-lab.exe file" src="images/image-25.png"/></p>
<p>Now click the <strong>jupyter-lab.exe</strong> option and click the <code>Always</code> button.</p>
<p><img alt="Selecting jupyter-lab.exe always" src="images/image-26.png"/></p>
<h2 id="5.-Test-the-configuration">5. Test the configuration<a class="anchor-link" href="#5.-Test-the-configuration"></a></h2><p>Now, whenever you double-click on a Jupyter Notebook file, it should open that file in Jupyter Lab. Follow the steps in the notebook to check your configuration and your software should be installed and configured correctly.</p>
<h2 id="6.-FAQ">6. FAQ<a class="anchor-link" href="#6.-FAQ"></a></h2><h4 id="1)-I-encounter-%22'conda'-is-not-recognized-as-the-name-of-a-cmdlet,-function,-script-file,-or-operable-program.%22.-What-should-I-do?">1) I encounter "'conda' is not recognized as the name of a cmdlet, function, script file, or operable program.". What should I do?<a class="anchor-link" href="#1)-I-encounter-%22'conda'-is-not-recognized-as-the-name-of-a-cmdlet,-function,-script-file,-or-operable-program.%22.-What-should-I-do?"></a></h4><p>This is likely because "conda" was not set as an environment variables (in part 1). There two ways of solving this problem:</p>
<p>a. Follow the instruction in this <a href="https://docs.anaconda.com/anaconda/uninstall/">link</a> and uninstall Anaconda completely. Then reinstall Anaconda and add "conda" as environment variables as described in part 1.<br/>
b. Follow the instrcution in this <a href="https://www.geeksforgeeks.org/how-to-setup-anaconda-path-to-environment-variable/">link</a> and correctly add conda to the environment variables.</p>
<h4 id="2)-I-could-not-find-anaconda3-folder.">2) I could not find <code>anaconda3</code> folder.<a class="anchor-link" href="#2)-I-could-not-find-anaconda3-folder."></a></h4><p>This is likely because you did not install anaconda in the location described above. To check the exact location of the <code>anaconda3</code> folder, simply search "anaconda3" in the search bar. Once you see the anaconda3 folder as below, click open file location will take you to the folder where <code>anaconda3</code> is installed.</p>
<p><img alt="searchbar" src="images/image-35.png"/></p>
<h4 id="3)-I-can't-open-the-notebook-with-jupyter-lab.">3) I can't open the notebook with jupyter lab.<a class="anchor-link" href="#3)-I-can't-open-the-notebook-with-jupyter-lab."></a></h4><p>This is likely because your default browser is not google chrome. Changing your default browser to google chrome should resolve this issue. This <a href="https://support.google.com/chrome/answer/95417?hl=en&amp;co=GENIE.Platform%3DDesktop#zippy=%2Cwindows">link</a> have instructions on how to set the default browser to chrome.</p>
<h4 id="4)-I-have-python-installed-previously-and-is-a-different-version,-what-should-I-do?">4) I have python installed previously and is a different version, what should I do?<a class="anchor-link" href="#4)-I-have-python-installed-previously-and-is-a-different-version,-what-should-I-do?"></a></h4><p>In search bar type "Anaconda Prompt" and you should see an anaconda prompt app as shown in the below image. Click on the anaconda prompt and a command prompt should open up.</p>
<p><img alt="anaconda prompt" src="images/image-36.png"/></p>
<p>But now you will see a "(base)" in front. This tells you that you are in the conda environment. Now type "python --version" and <code>shift</code> + <code>enter</code> to see what is the current python version in conda environment. If it is not correct, follow the above instruction in the anaconda prompt to install the correct python version.</p>
<p><img alt="anaconda commadn prompt" src="images/image-37.png"/></p>
<h4 id="5)-My-debugger-is-not-working">5) My debugger is not working<a class="anchor-link" href="#5)-My-debugger-is-not-working"></a></h4><p>Open up the <code>kernel.json</code> file. Double check whether you have correctly changed and saved the content in the <code>kernel.json</code>.</p>
</div>
</div>
</div>
......
%% Cell type:markdown id:065521ba-569b-4b06-a5fc-98917171d1dd tags:
# Installation Instructions for Windows
This document will walk you through the steps you need to perform to install and configure **Jupyter Lab**, the development software you will use for CS220. You need to perform 5 steps:
1. Download and install Anaconda
2. Change the Python version
3. Enable the debugger
4. Associate notebook files with Jupyter lab
5. Test your configuration
## 1. Download and install Anaconda
[Anaconda](https://www.anaconda.com/) is a suite of software programs used for data science. In a browser go to Anaconda's download page [https://www.anaconda.com/download/](https://www.anaconda.com/download/) to download the software. You can either provide an email address and click the submit button or click the **Skip registration** to bypass providing your email.
On the download page, it should have detected your operating system and provided a link at the top of the page for the proper version.
![download button](images/image.png)
Download and run the installer. On the "Install for:" page select "Just Me (recommended)" and then accept the default installation folder.
![Install for Just Me](images/image-4.png)
![Keep Default Install Location](images/image-5.png)
On the Advanced Installation Options, keep the default first and third checkmarks to create a shortcut and register Anaconda3 as the default for Python.
On the Advanced Installation Options, keep the default first and third checkmarks to create a shortcut and register Anaconda3 as the default for Python. Keep the second checkmarks to allow using conda in command prompt (which we will learn about it later).
![Keep Default Checkmarks](images/image-6.png)
Finish running the installer.
![Final Installation Screen](images/image-10.png)
## 2. Change Python version
You will be submitting your code to our grader, which is running a slightly older version of Python, version 3.10.12. So you need to make sure you are running the same version on your computer. Click on the windows logo and in the search box type "shell". You should see an option to run **Windows PowerShell** where you can type commands. Click to launch this program. Type the command `conda install python=3.10.12` and press enter. Follow the instructions to have it proceed and install that version of Python. When it is finished you can check that it has installed the proper version by typing `python --version`.
![Command to Install Proper Version of Python](images/image-14.png)
![Proceed to Installation](images/image-13.png)
![Command to Check Python Version](images/image-15.png)
## 3. Enable the debugger
One feature of Jupyter Lab that we will use this semester is the debugger. It is disabled by default. To enable it you will need to edit a text file. Start by opening the file explorer
![File Explorer Icon](images/image-18.png) and in the sidebar, click on *home*.
![Home option in File Explorer](images/image-19.png)
![File Explorer Icon](images/image-18.png) and in the sidebar, click on your C disk *(C:)*.
Browse inside the `anaconda3` folder to the `share\jupyter\kernels\python3\` folder and double click to open the kernel.json file in Notepad.
![C: disk option in File Explorer](images/image-19.png)
Browse inside the `Users` folder and select the one that looks like your name (i.e. 'yunha' in the image below).
![Users folder](images/image-28.png)
![user folder](images/image-29.png)
If you install anaconda correctly, you should found a folder name `anaconda3` in this folder.
![inside user folder](images/image-30.png)
Browse inside the `anaconda3` folder. Scroll down a little bit and you should find a folder name `share`.
![share](images/image-31.png)
Click `share`, then click `jupyter`,`kernels`, `python3` to the `share\jupyter\kernels\python3\` folder.
![jupyter](images/image-32.png)
![kernels](images/image-33.png)
![python3](images/image-34.png)
Double click to open the kernel.json file in Notepad.
![Content of anaconda3/share/jupyter/kernels/python3 folder](images/image-20.png)
![Open kernel.json file with Noepad](images/image-21.png)
![Open kernel.json file with Notepad](images/image-21.png)
The line that reads `"debugger": false` needs to be changed to be `"debugger": true` and then save the file.
![Original content of kernel.json](images/image-16.png)
![New content of kernel.json](images/image-17.png)
## 4. Associate Notebook Files with Jupyter Lab
The files that we will be working with this semester are called *Jupyter Notebook* files. These files have a file extension of `.ipynb`. You can make it so that when you double click on a file that ends in `.ipynb` that it will be opened by Jupyter Lab. Download the <a href="../test_configuration.ipynb" target="_blank" download>Test Configuration Notebook</a> which we will use to change the file assocation. Then open your Downloads folder in the File Explorer. At the top of the window, click on the **View -> Show -> File name extensions** option so you can see the file extension of the notebook file.
![Show File Name Extensions](images/image-22.png)
Now double click to try and open the notebook file. It will ask you to select an app to open the file. Click on the **Choose an app on your PC** and browse to your username and open the anaconda3/Scripts folder and select `jupyter-lab.exe`.
Now double click to try and open the notebook file. It will ask you to select an app to open the file. Click on the **Choose an app on your PC**
Now similar to part 3, browse to your username and open the `anaconda3` folder. But now after you click inside the `anaconda3` folder, click into the `Scripts` folder instead of the `share` folder. The `Scripts` folder should be right on top of the `share` folder. Inside the `Scripts` folder select `jupyter-lab.exe`.
![Select an App to open .ipynb files](images/image-23.png)
![Scripts folder inside ananconda3 folder](images/image-24.png)
![jupyter-lab.exe file](images/image-25.png)
Now click the **jupyter-lab.exe** option and click the `Always` button.
![Selecting jupyter-lab.exe always](images/image-26.png)
## 5. Test the configuration
Now, whenever you double-click on a Jupyter Notebook file, it should open that file in Jupyter Lab. Follow the steps in the notebook to check your configuration and your software should be installed and configured correctly.
## 6. FAQ
#### 1) I encounter "'conda' is not recognized as the name of a cmdlet, function, script file, or operable program.". What should I do?
This is likely because "conda" was not set as an environment variables (in part 1). There two ways of solving this problem:
a. Follow the instruction in this [link](https://docs.anaconda.com/anaconda/uninstall/) and uninstall Anaconda completely. Then reinstall Anaconda and add "conda" as environment variables as described in part 1.
b. Follow the instrcution in this [link](https://www.geeksforgeeks.org/how-to-setup-anaconda-path-to-environment-variable/) and correctly add conda to the environment variables.
#### 2) I could not find `anaconda3` folder.
This is likely because you did not install anaconda in the location described above. To check the exact location of the `anaconda3` folder, simply search "anaconda3" in the search bar. Once you see the anaconda3 folder as below, click open file location will take you to the folder where `anaconda3` is installed.
![searchbar](images/image-35.png)
#### 3) I can't open the notebook with jupyter lab.
This is likely because your default browser is not google chrome. Changing your default browser to google chrome should resolve this issue. This [link](https://support.google.com/chrome/answer/95417?hl=en&co=GENIE.Platform%3DDesktop#zippy=%2Cwindows) have instructions on how to set the default browser to chrome.
#### 4) I have python installed previously and is a different version, what should I do?
In search bar type "Anaconda Prompt" and you should see an anaconda prompt app as shown in the below image. Click on the anaconda prompt and a command prompt should open up.
![anaconda prompt](images/image-36.png)
But now you will see a "(base)" in front. This tells you that you are in the conda environment. Now type "python --version" and `shift` + `enter` to see what is the current python version in conda environment. If it is not correct, follow the above instruction in the anaconda prompt to install the correct python version.
![anaconda commadn prompt](images/image-37.png)
#### 5) My debugger is not working
Open up the `kernel.json` file. Double check whether you have correctly changed and saved the content in the `kernel.json`.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment