python development environment installation and configuration

Summarizes the installation and configuration of python development environment. General installation anaconda and pycharm can be.

1. Install anaconda

Anaconda指的是一个开源的Python发行版本,其包含了conda、Python等180多个科学包及其依赖项。 因为包含了大量的科学包,Anaconda 的下载文件比较大(约 531 MB),如果只需要某些包,或者需要节省带宽或存储空间,也可以使用Miniconda这个较小的发行版(仅包含conda和 Python)

In simple terms, anaconda python which integrates a number of scientific computing on third-party libraries, and easy to use.

Download: Qing Huan University of open source software mirroring station
Notes:

  • Note Depending on the system version of your computer, and you need to install anaconda, select the appropriate version of the download time to download and install

  • anaconda that comes with Python, so do not need to go download and install Python, of course, if you have already installed Python does not matter, does not conflict!

2. Install pycharm

Download: PyCharm download

3. Configuring the anaconda interpreter pycharm

具体做法:File -> Default Settings -> project interpreter -> 接着点击 project interpreter 的右边的小齿轮 -> 选择 add local -> 选择anaconda文件路径下的python.exe -> 接着pycharm会更新解释器,导入模块等 -> 点击 Apply 即可

Well, so far, the basic python development environment configuration is complete.
Operation pip source configuration under the following carding

4. pip source configuration

To windows7 (64 Wei), python 2.7, for example.

  • windows file manager, enter% APPDATA%, Enter
  • Automatically open a new directory, create a pip folder in this directory, and then create a pip.ini file folder pip
  • Enter the new pip.ini file at the contents:
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple

To stop, arranged to get pip source.

Domestic better mirror source

豆瓣:https://pypi.douban.com/simple/
阿里云:https://mirrors.aliyun.com/pypi/simple/
中国科技大学:https://pypi.mirrors.ustc.edu.cn/simple/
清华大学:https://pypi.tuna.tsinghua.edu.cn/simple/

5. anaconda source configuration of

After the anaconda installation, the installation can be carried out using anaconda Python library, the same source required configuration.

在配置了anaconda的pycharm中的终端(Terminal)逐条输入以下两条命令即可:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

conda config --set show_channel_urls yes

6. conda package management

anaconda provides a convenient package management commands - conda.
Here are some commonly used commands:

# 查看已经安装的packages
conda list

# 查看某个指定环境的已安装包
conda list -n python27

# 查找package信息
conda search numpy

# 安装scipy
conda install scipy

# 安装package
# 如果不用-n指定环境名称,则被安装在当前活跃环境
conda install -n python27 numpy

# 更新package
conda update -n python27 numpy

# 删除package
conda remove -n python27 numpy

conda will conda, python and so deemed package, therefore, can be used to manage conda conda and python version, such as:

# 更新conda,保持conda最新
conda update conda

# 更新anaconda
conda update anaconda

# 更新python
conda update python

Guess you like

Origin www.cnblogs.com/gaozhidao/p/12325187.html