anaconda安装python3_安装anaconda和python3.7环境

安装anaconda和python3.7

1087718-20190124152754395-1846792326.png

安装matplotlib报错(参考https://github.com/conda/conda/issues/6007)

# 设置源为清华

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

conda config --set show_channel_urls yes

D:\python\chuanzhi_15>conda install matplotlib

Solving environment: failed

CondaHTTPError: HTTP 000 CONNECTION FAILED for url

Elapsed: -

An HTTP error occurred when trying to retrieve this URL.

HTTP errors are often intermittent, and a simple retry will get you on your way.

If your current network has https://www.anaconda.com blocked, please file

a support request with your network engineering team.

SSLError(MaxRetryError("HTTPSConnectionPool(host='repo.anaconda.com', port=443): Max retries exceeded with url: /pkgs/main/win-64/repodata.json.bz2 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)')))"))

解决办法:

1087718-20190124153325116-216753423.png

Pycharm中配置cando环境

1087718-20190124153333522-420025948.png

Page01.py文件:

# coding:utf-8

from matplotlib import pyplot as plt

x = range(2, 26, 2)

y = [15, 13, 14.5, 17,20,25,26,26,24,22,18,15]

plt.plot(x,y)

plt.show()

1087718-20190124153346313-357849332.png

运行简单的画图效果程序报错:

D:\python\chuanzhi_15>python page01.py

Traceback (most recent call last):

File "D:\ProgramData\Anaconda3\lib\site-packages\numpy\core\__init__.py", line 16, in

from . import multiarray

ImportError: DLL load failed: 找不到指定的模块。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "page01.py", line 3, in

from matplotlib import pyplot as plt

File "D:\ProgramData\Anaconda3\lib\site-packages\matplotlib\__init__.py", line 126, in

from . import cbook

File "D:\ProgramData\Anaconda3\lib\site-packages\matplotlib\cbook\__init__.py", line 34, in

import numpy as np

File "D:\ProgramData\Anaconda3\lib\site-packages\numpy\__init__.py", line 142, in

from . import add_newdocs

File "D:\ProgramData\Anaconda3\lib\site-packages\numpy\add_newdocs.py", line 13, in

from numpy.lib import add_newdoc

File "D:\ProgramData\Anaconda3\lib\site-packages\numpy\lib\__init__.py", line 8, in

from .type_check import *

File "D:\ProgramData\Anaconda3\lib\site-packages\numpy\lib\type_check.py", line 11, in

import numpy.core.numeric as _nx

File "D:\ProgramData\Anaconda3\lib\site-packages\numpy\core\__init__.py", line 26, in

raise ImportError(msg)

ImportError:

Importing the multiarray numpy extension module failed. Most

likely you are trying to import a failed build of numpy.

If you're working with a numpy git repo, try `git clean -xdf` (removes all

files not under version control). Otherwise reinstall numpy.

Original error was: DLL load failed: 找不到指定的模块。

1087718-20190124153408137-871394098.png

画图效果

1087718-20190124153418999-408832652.png

解决办法将D:\ProgramData\Anaconda3\Library\bin加入环境变量:

1087718-20190124153429578-526114742.png

你可能感兴趣的:(anaconda安装python3_安装anaconda和python3.7环境)