Skip to content. | Skip to navigation

Personal tools

Navigation

You are here: Home / Tutorial / Anaconda

Anaconda

安裝 管理 昇級 對 Python 愛好者而言, 用 Anaconda 管理 Node 可能是好主意嗎? https://news.ycombinator.com/item?id=12510212 我不是指用 conda 管理所有事, 而是在特定情況下, 這樣能達到夠用且最好用的效果嗎? http://github.com/conda/conda/issues/292

Anaconda 有幾種不同的應用場合或意義: anaconda.com Platform; anaconda.org Cloud; Channel; mini-conda Environment vs Channel

$ conda update --all

$ conda update -n base conda $ conda create --name kotti_py364 python=3.6.4 # # To activate this environment, use: # > source activate kotti_py364 # # To deactivate an active environment, use: # > source deactivate #
$ conda info --envs
# conda environments:
#
base       * C:\Users\marr\Anaconda3

$ conda install -c conda-forge --name base selenium

install pip virtualenv:

$ conda create --name myapp_27 python=2.7 flask sqlalchemy
$ conda env list
$ source activate myapp_27
$ source deactivate
$ python -V
Python 3.6.1
$ conda create --name py361env (其實預設是產生 Python 3.5.4 環境)
Solving environment: done

## Package Plan ##

  environment location: /Users/marr/anaconda3/envs/py361env

Proceed ([y]/n)?

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use:
# > source activate py361env
#
# To deactivate an active environment, use:
# > source deactivate
#

$ conda env list
# conda environments:
#
base       *  /Users/marr/anaconda3
py361env      /Users/marr/anaconda3/envs/py361env


$ source activate py361env

$ conda install -c esri arcgis
To initialize this nbextension in the browser every time the notebook (or other app) loads:

  jupyter nbextension enable arcgis --py --sys-prefix

Enabling notebook extension arcgis/mapview...
  - Validating: OK

$ git clone git@github.com/Esri/arcgis-python-api.git (samples folder)

virtualenv for beginner Managing Channels Intel Distribution for Python

conda 類似於 pipenv (= pip + virtualenv),結合套件管理與虛擬環境,但好處是 conda 支援 Python 之外的多樣語言,例如 R 也可以用 conda安裝;conda比較麻煩的地方是,用 pip 裝的套件不受 conda 管轄 (可以匯出/列表但是更新/安裝/移除要用 pip),還有套件數較 pip 略少 (雖然也很多了)。如果你覺得要背兩套系統太麻煩,其實可以試試 pipenv (PyPi 官方推薦的)

conda 安裝結果的執行效率較好 Windows Menu 設定

Jupyter Notebook Ubuntu Install

import 找不到模組的常見問題

How a Notebook is Changing Science: image video Magic Bash: 50:44-59:59 Install a Second Kernel: 1:55:00-1:58:00 JupyterHub with Kubernates: 2:45:00-3:19:00 One Button Workflow nbflow: 3:26-12:50

Cell Magic Extensions Jupyter Public Server Jupyter BinderHub

$ sudo apt-get install python-dev build-essentials
$ sudo pip install --upgrade jupyter
$ jupyter notebook --no-browser
$ jupyter notebook --no-browser --ip=*

Jupyter Protocol Notebook as Document: from Structure to Application

Tips for Data Science Extensions - Diagram Editor: Draw.io ShareLaTeX

Renders and Render Extensions

Expert Example Code

Datalab

Colaboratory Get Ready with Jupyter Notebooks Against Large Datasets

Node.js

Installing Node.js and NPM python-virtualenv

# To install this package with conda run one of the following:
$ conda install -c conda-forge nodejs

# Or
$ conda install -c conda-forge/label/gcc7 nodejs

Tensorflow

conda create --name=tensorflow --python=3.5 anaconda
activate tensorflow
pip install tensorflow keras
pip install selenium
from selenium import webdriver

https://medium.com/datainpoint/python-essentials-conda-quickstart-1f1e9ecd1025