Anaconda

发布于 2017-11-15 15:09:48

Anaconda is the Most Popular Python Data Science Platform.

Package, dependency and environment management for any language—Python, R, Ruby, Lua, Scala, Java, JavaScript, C/ C++, FORTRAN.

getting-started

Anaconda常用命令

管理环境

# 升级conda
conda update conda

# 安装、删除环境
conda create -n tensorflow python=3.5 [<packages separate with space>] # from python3.5, with name tensorflow
conda remove -n <env_name> --all

# 克隆环境
conda create --name flowers --clone snowflakes

# 激活、退出环境
# linux
source activate tensorflow
source deactivate

# windows
activate tensorflow
deactivate

# 列出安装的环境
conda info --envs

管理python

# 搜索
conda search --full-name python
# 安装(同上)
conda create -n tensorflow python=3.5

管理包

# 查看环境已安装的包
conda list
# 在线查看:https://docs.continuum.io/anaconda/pkg-docs.html
# 搜索
conda search beautifulsoup4
# 1.安装包到某个环境,默认当前环境
conda install [--name bunnies] beautifulsoup4

# 2.搜索包:http://anaconda.org/
conda install -c conda-forge beautifulsoup4

# 3.通过pip安装
# 查看
conda list


# 卸载
# 移除包
conda remove --name bunnies iopro
# 移除环境
conda remove --name snakes --all
# 移除conda本身
rm -rf ~/anaconda

python 从URL安装.whl包

pip install --ignore-installed --upgrade <tfBinaryURL>

主机间复制docker镜像

只有腾讯云有个内存大点的闲置机器,国内网速也快些,配置过来方便在线玩玩。(系统不是以systemd启动的,官网的代理配置方法不可用)

docker save -o <save image to path> <image name>
docker load -i <path to image tar file>
docker tag <image id> <repository name>

# startup script
docker rm -f tensorflow
docker run -p 9000:8888 --name tensorflow -it --rm tensorflow
comments powered by Disqus