Now is better than never.
Tim Peters, Zen of Python
python --version
檢查電腦是否已經有安裝 Python# run in command line
(base) conda update conda
# run in command line
(base) conda install jupyter
# run in command line
(base) conda env list
# run in command line
(base) conda create --name <env_name> python=3.7
# run in command line
(base) conda activate <env_name>
# conda deactivate # 回到原本的 (base)
# run in command line
(env_name) conda install ipykernel requests lxml beautifulsoup4 selenium
# run in command line
(env_name) python -m ipykernel install --user --name <kernel_name> --display-name "Python Web Scraping"
# run in command line
(env_name) jupyter kernelspec list
# run in command line
(env_name) conda deactivate
import
套件函式比較兩個 kernels¶from bs4 import BeautifulSoup
from selenium import webdriver
# run in command line
jupyter kernelspec remove <kernel_name>
# run in command line
conda deactivate
conda remove --name <env_name> --all