Install Anaconda
Anaconda
A good tool for beginners
Contains many Python packages
Science, mathematics, data analysis, data analysis...
Support Linux、Windows、Mac
Free
Install Anaconda
Go to: [Link]
1
Install Anaconda
Download Windows OS
Python 3.8 version
2
Install Anaconda
Click Next >
Install Anaconda
Click I Agree
Install Anaconda
點擊 Next >
Install Anaconda
Click Next >
Install Anaconda
Both options must be checked
Click Install
Install Anaconda
Start Install
Install Anaconda
Install finish,Click Next >
Install Anaconda
Uncheck the two options and click Finish to end the
installation process
Install Anaconda
Test whether Anaconda is installed successfully 檢查版本
search CMD
Install Anaconda
It should be as shown as
the right after opening.
Type in:
> conda -V
If the version number is out
put, the installation is
successful.
Create a virtual environment Conda
What is Anaconda virtual environment
Virtual environment is a tool to separate different project
environments
Using virtual environment to develop, you can avoid version
conflicts
e.g.
A and B two projects, they use different library versions, there may be
version conflicts
If you create a virtual environment, you can avoid this problem
Create Anaconda virtual environment
open CMD
Type in:
> conda create --name tf2.2 python=3.7 anaconda
tf2.2 is the name of the virtual environment, users can name
themselves
The python version in the virtual environment can be customized
Create Anaconda virtual environment
After inputting the command, the computer will start to
collect the related packages. After the collection, it will ask
whether to execute (Proceed ([y]/n)? ), input y to start the
installation
Create Anaconda virtual environment
Installed
Create Anaconda virtual environment
Start the virtual environment
> activate tf2.2
After successful startup, as shown in the figure
Install tensorflow
Install tensorflow
After starting the virtual environment, install tensorflow
> pip install tensorflow
Introduction to Development
Environment Jupyter Notebook
Open Jupyter Notebook
Type in:
> jupyter notebook
Jupyter Notebook
The default supported languages are Julia, Python and R
Use browser as interface (Web-Based)
Interactive notebook
Jupyter Notebook
Jupyter is created by the three parts of Notebook Frontend,
Jupyter Server and Kernel Protocol (refer to the official
information below)
Jupyter Notebook
interface Open the
Save Create Changing command Logout
notebook new cell Moving cell cell mode palette notebook
Cut off Copy Paste Run interrupt restart Kernel Idle
cell cell cell cell kernel kernel
below
Jupyter Notebook
Mode
Edit
Command
Library installation method
PIP
pip install:
Pip installs Packages, the officially recognized package
manager of python, is most commonly used to install packages
published on the Python Package Index (PyPI).
Example > pip install tensorflow-gpu==2.2
Instruction query URL [Link]
CONDA
conda install:
Conda is a general-purpose package management system,
which is any type of software that can build and manage any
language.
Example: > conda install cudatoolkit=10.1
指令查詢網址 [Link]
PIP and CONDA
pip install install python package in any environment
Conda install only install any package in conda environment
Colab
Colab
Go to: [Link]
Add a new notebook and you can get started
Colab
Library installation method
Type in cell: !pip install libraries
Colab
Most of the libraries are already available in Colab, usually you
don't need to install by your own.
Colab
Most of the instructions are same as the Jupyter notebook.
Colab or jupyter notebook
Jupyter notebook Colab
Runs on your own hardware Runs on google server
Uses system processor Free GPU and TPU online or you can use
your local machine
Library install manually Most library are pre-installed
Installed through anaconda or python No need to installed, can be used through
browser
Can’t access your notebook files without Can be accessed from anywhere since it’s
your hard-drive stored in your google drive
Completely free Partially free
Colab or jupyter notebook
-END-