Python开发环境搭建
发布日期:2021-05-09 14:40:42 浏览次数:19 分类:博客文章

本文共 7716 字,大约阅读时间需要 25 分钟。

���������������������������������������������������������������������������Java���������������������������������������JDK������������������������������������������������������JDK���������������������������JAVA_HOME���������JAVA_HOME���bin���������������������������PATH���������������������������������������������������������������������������������������������������������������������������������������Maven������Golang���Scala������������������������������������������������������������������������IDE���������������������������������������������������������������������������vim���VS Code���JetBrains������������Eclipse���������

������Python������������������������������������Anaconda������������������Miniconda���

���������������Anaconda

Anaconda���������https://www.anaconda.com/

Anaconda ������������������������������ Python ������������������ Linux, Mac, Windows, ������������������������������������������������������ Python ������

������Anaconda������������������������������Conda������������https://docs.conda.io/en/latest/

Conda is an open source package management system and environment management system that runs on Windows, macOS and Linux. Conda quickly installs, runs and updates packages and their dependencies. Conda easily creates, saves, loads and switches between environments on your local computer. It was created for Python programs, but it can package and distribute software for any language.

Conda������������������������Python������������������������������������������������������������Conda������������������������������������������������������������������������������������������������������

Conda������������������������������������A���������������Python2������B������������������Python3���������������������Python���������������������������������������������������������Conda���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������

Anaconda������Python���Conda������������������������������������������������������������������numpy���pandas���������������������������������������

Miniconda���������������Python���Conda���

���������������������������Anaconda���������������������������Python���������������������������������������������������������������������������������������

������������Anaconda

������Anaconda

������������������������������������������������������������������������������������������������������������������������������������������������������������(������������������������������������������)���

https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/?C=M&O=D

���������������������������������conda info������������conda������������python���������������������������������conda list������������������������������������������������

���������������������

conda���pip������������������������������������������������conda install xxx������pip install xxx���������������������������������������������������������������������������������

  • ������Conda���������

    ������������������
    https://mirror.tuna.tsinghua.edu.cn/help/anaconda/

  • ������pip���������

    Linux���������������������������

mkdir ~/.pipcd ~/.pipvim pip.conf

������������������������������������������

[global]index-url = https://pypi.mirrors.ustc.edu.cn/simple/

������������������������������������������Conda������������������������Anaconda������������������������������pip���������������

���������������Anaconda���������������������������������conda install xxx���������������������������������������Anaconda������������������������������������pip������������������������conda������������������������������������������������������pip������������conda������������

������Anaconda���������pip������������������������������������������������������������������

������������������������������������pip���������pip install xxx���������������������������������������Linux������������������which pip������������������������pip������������������pip���

������������������������������������������������������conda���=���pip���==������������������

conda install xxx=1.0.0pip install xxx==1.0.0

������Anaconda

���������������������������base���������������������������������base���������������������������������������������������

# ������base������, ������test������conda create --name test --clone base# ������test������conda activate test

������Conda������������base������������

conda config --set auto_activate_base false

������������������������������������������������������������2������������������������������test���������

(test) ���  ~ conda info -e# conda environments:#base                     /Volumes/300g/opt/anaconda3test                  *  /Volumes/300g/opt/anaconda3/envs/test

Anaconda���������������jupyter���������������������

jupyter notebook

������������������������������������������Jupyter Notebook������������������http://localhost:8888������������������������������Jupyter Notebook���

���������������������conda���������������������

  • ������������������
# ������������������������python=3.6���������python���������conda create --name env_name python=3.6# ���������������������������������������������������������������conda create --name env_name python=3.7 numpy scrapy# ������������������conda activate env_name# ������������������conda deactivate# ������������������conda create --name new_env_name --clone old_env_name# ������������������conda remove --name env_name --all# ���������������������������yml������������������������������������������conda env export > environment.yml# ���������������������������yml������������������������conda env create -f environment.yml
  • ���������
# ���������������������������������������conda list# ���������������������������������������conda list -n env_name# ���������conda search scrapys# ������������������������������������������������scrapy=1.5.0���conda install scrapy# ������������������������������conda install --name target_env_name package_name# ������������������conda update scrapy# ���������������������������conda update -n target_env_name package_name# ���������������conda update --all# ������������������������conda remove scrapy# ���������������������������conda remove -n target_env_name package_name

������������������������������������������������������������

conda --helpconda install --help

������Jupyter Notebook

Jupyter������2014������ipython���������������������������������������������������������������������������������������������Jupyter Notebook���������IPython Notebook������IPython���������������������������������Web������������������������������������������������������������/������/������/���������������������������������������Jupyter Notebook������������������������

Jupyter Notebook���������������������������������Markdown���������������������������������������������������������������������������������������������������������������������������������������������������������

Jupyter Notebook���������In Out������������������������������������������cell���������cell������������*���������������������������������

Jupyter Notebook���������������������

  • ���������������Enter���

    ���������������������Enter���������������cell������������������

  • ���������������Esc)

    ���Esc���������������������������������

������������������������������������������������������������������������������������������������������������������������

������jupyter_contrib_nbextensions���

������������������jupyter������������������������������������������

pip install jupyter_contrib_nbextensionsjupyter contrib nbextension install --user --skip-running-check

������������������������������������������

������������������������������������������������

上一篇:一文上手Python3
下一篇:使用promise封装wx.request

发表评论

最新留言

不错!
[***.144.177.141]2025年04月24日 12时34分17秒