Setting up Jupyter Notebook

From AWF-Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with " '''Windows Miniconda''' Go to the Miniconda Downloads page. Download the appropriate (32- or 64-Bit) Python 3.X version of Miniconda. Double click on the .exe file and click...")
 
(Create a new Conda environment with tensorflow)
 
(15 intermediate revisions by one user not shown)
Line 1: Line 1:
  
'''Windows Miniconda'''
+
==Installation Guide for Windows Miniconda==
Go to the Miniconda Downloads page. Download the appropriate (32- or 64-Bit) Python 3.X version of Miniconda.
+
Go to the Miniconda Download page [[https://docs.conda.io/en/latest/miniconda.html Miniconda Download]]. Download the appropriate (32- or 64-Bit) Python 3.7 version of Miniconda.
  
Double click on the .exe file and click Install.
+
*Double click on the .exe file and click {{button|text=Install}}.
Read and agree to the licensing terms.
+
*Read and agree to the licensing terms.
Select if you want to install for ‘Just Me’ or ‘All Users’. If you are installing for ‘All Users’, you must have Administrator privileges.
+
*Select if you want to install for ‘Just Me’ or ‘All Users’. If you are installing for ‘All Users’, you must have Administrator privileges.
You will be prompted to select the installation location. By default, Anaconda should try to install in your home directory. We recommend accepting this default. Click Install.
+
*You will be prompted to select the installation location. By default, Anaconda should try to install in your home directory. We recommend accepting this default. Click {{button|text=Install}}.
You will be asked if you want to add Anaconda to your PATH environment variable. Do not add Anaconda to the PATH because it can interfere with other software.
+
You will be asked if you want Anaconda to be your default version of Python. We recommend ‘Yes’. There are some rare instances where you might not make Anaconda the default version, but they are beyond the scope of this article.
+
Click the Install button.
+
  
Now we need to install a few key packages. In the Anaconda Prompt, type
+
{{info|message=Anaconda PATH environment variable|text=You will be asked if you want to add Anaconda to your PATH environment variable. '''Do not''' add Anaconda to the PATH because it can interfere with other software.}}
  
conda install jupyter
+
*You will be asked if you want Anaconda to be your default version of Python. We recommend ‘Yes’.
 +
*Click {{button|text=Install}}.
  
Once the installation completes, in the Anaconda Prompt, type:
+
===Create a new Conda environment with tensorflow===
 +
To install the current release of CPU-only TensorFlow we create a new  environment with name ''tf'' and install the package tensorflow. The Conda environment is directory which contains a specific installation of Python packages. That means for example, yoe can have different environemnts with different package compilations oder different version of packages.
 +
* Open the Anaconda Command Prompt from windows start menu, type:
 +
<source lang="dos">
 +
conda create --name tf tensorflow
 +
</source>
 +
* To activate and use the new environment, type:
 +
<source lang="dos">
 +
conda activate tf
 +
</source>
  
jupyter notebook
+
===Install Jupyter===
 +
[[https://jupyter.org/ Jupyter]] Notebook is an easy-to-use, interactive, web-based editor for writting and executing Python code.
 +
* In the Anaconda Prompt, type
 +
<source lang="dos">conda install jupyter</source>
 +
 
 +
Once the installation is complete, you can run a jupyter notebook by typing:
 +
 
 +
<source lang="dos">jupyter notebook</source>
 +
 
 +
A Jupyter Notebook interface will appear in your default browser.
 +
[[file:jupyter-directory-browser.png|300px]]
 +
 
 +
===Install required packages===
 +
Now we install a few packages we need for the course.
 +
* In the Anaconda Command Prompt, type (hit ‘Enter’ after each row)
 +
<source lang="python">
 +
conda install numpy
 +
conda install -c conda-forge matplotlib
 +
conda install -c conda-forge pandas
 +
conda install -c anaconda pillow
 +
</source>
 +
* Press {{button|text=Enter}} after each row
  
 
[[Category: Deep Learning in Forestry]]
 
[[Category: Deep Learning in Forestry]]

Latest revision as of 13:19, 15 October 2021

Contents

[edit] Installation Guide for Windows Miniconda

Go to the Miniconda Download page [Miniconda Download]. Download the appropriate (32- or 64-Bit) Python 3.7 version of Miniconda.

  • Double click on the .exe file and click Install.
  • Read and agree to the licensing terms.
  • Select if you want to install for ‘Just Me’ or ‘All Users’. If you are installing for ‘All Users’, you must have Administrator privileges.
  • You will be prompted to select the installation location. By default, Anaconda should try to install in your home directory. We recommend accepting this default. Click Install.


info.png Anaconda PATH environment variable
You will be asked if you want to add Anaconda to your PATH environment variable. Do not add Anaconda to the PATH because it can interfere with other software.
  • You will be asked if you want Anaconda to be your default version of Python. We recommend ‘Yes’.
  • Click Install.

[edit] Create a new Conda environment with tensorflow

To install the current release of CPU-only TensorFlow we create a new environment with name tf and install the package tensorflow. The Conda environment is directory which contains a specific installation of Python packages. That means for example, yoe can have different environemnts with different package compilations oder different version of packages.

  • Open the Anaconda Command Prompt from windows start menu, type:
conda create --name tf tensorflow
  • To activate and use the new environment, type:
conda activate tf

[edit] Install Jupyter

[Jupyter] Notebook is an easy-to-use, interactive, web-based editor for writting and executing Python code.

  • In the Anaconda Prompt, type
conda install jupyter

Once the installation is complete, you can run a jupyter notebook by typing:

jupyter notebook

A Jupyter Notebook interface will appear in your default browser. Jupyter-directory-browser.png

[edit] Install required packages

Now we install a few packages we need for the course.

  • In the Anaconda Command Prompt, type (hit ‘Enter’ after each row)
conda install numpy
conda install -c conda-forge matplotlib
conda install -c conda-forge pandas
conda install -c anaconda pillow
  • Press Enter after each row
Personal tools
Namespaces

Variants
Actions
Navigation
Development
Toolbox
Print/export