详解windows python3.7安装numpy问题的解决方法

yipeiwu_com5年前Python基础

我的是win7的系统,去python官网下载python3.7安装

CMD  #打开命令窗口

pip install numpy #在cmd中输入

提示 需要c++14.0,

解决办法:

1, 进入https://www.lfd.uci.edu/~gohlke/pythonlibs/ 

我的是win10的系统,去python官网下载python3.7安装

CMD  #打开命令窗口

pip install numpy #在cmd中输入

提示 需要c++14.0,

解决办法:

1, 进入https://www.lfd.uci.edu/~gohlke/pythonlibs/

根据我的电脑和安装的python我下载最后一个,保存在python目录下,随后cmd进入该目录,

输入pip install numpy‑1.14.1+mkl‑cp37‑cp37m‑win_amd64.whl   即可

C:\Users\12345\AppData\Local\Programs\Python\Python37\Scripts>pip install numpy-1.14.3+mkl-cp37-cp37m-win_amd64.whl Processing c:\users\12345\appdata\local\programs\python\python37\scripts\numpy-1.14.3+mkl-cp37-cp37m-win_amd64.whl Installing collected packages: numpy Successfully installed numpy-1.14.3+mkl

  同样的 安装pandas 的方法也是一样的

下载后 复制到\Users\12345\AppData\Local\Programs\Python\Python37\Scripts>

pip install pandas-0.23.0-cp37-cp37m-win_amd64.whl

安装图形界面seaborn 也一样

pip install seaborn-0.8.1-py2.py3-none-any.whl

但是安装matplotlib遇到了 error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools

解决方法是下载

http://1445568.ch1.data.tv002.com:443/down/fd9282f666dce22ef8848171236f456a-3287928/visualcppbuildtools_full.exe?cts=f-D120A234A24A43F105e1&ctp=120A234A24A43&ctt=1528324956&limit=1&spd=150000&ctk=17728aba100ad4e1159d27227523f6da&chk=fd9282f666dce22ef8848171236f456a-3287928&mtd=1

下载完成后重新pip install matplotlib-2.2.2-cp37-cp37m-win_amd64.whl

C:\Users\12345\AppData\Local\Programs\Python\Python37\Scripts>pip install matplotlib-2.2.2-cp37-cp37m-win_amd64.whl
Processing c:\users\12345\appdata\local\programs\python\python37\scripts\matplotlib-2.2.2-cp37-cp37m-win_amd64.whl
Requirement already satisfied: six>=1.10 in c:\users\12345\appdata\local\programs\python\python37\lib\site-packages (from matplotlib==2.2.2) (1.11.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\users\12345\appdata\local\programs\python\python37\lib\site-packages (from matplotlib==2.2.2) (2.2.0)
Requirement already satisfied: pytz in c:\users\12345\appdata\local\programs\python\python37\lib\site-packages (from matplotlib==2.2.2) (2018.4)
Requirement already satisfied: python-dateutil>=2.1 in c:\users\12345\appdata\local\programs\python\python37\lib\site-packages (from matplotlib==2.2.2) (2.7.3)
Requirement already satisfied: cycler>=0.10 in c:\users\12345\appdata\local\programs\python\python37\lib\site-packages (from matplotlib==2.2.2) (0.10.0)
Collecting kiwisolver>=1.0.1 (from matplotlib==2.2.2)
 Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001AEFF3E5F60>, 'Connection to 10.180.28.148 timed out. (connect timeout=15)')': /simple/kiwisolver/
 Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001AEFF3E5B38>, 'Connection to 10.180.28.148 timed out. (connect timeout=15)')': /simple/kiwisolver/
 Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001AEFF3E59E8>, 'Connection to 10.180.28.148 timed out. (connect timeout=15)')': /simple/kiwisolver/
 Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001AEFF407B70>, 'Connection to 10.180.28.148 timed out. (connect timeout=15)')': /simple/kiwisolver/
 Using cached https://files.pythonhosted.org/packages/31/60/494fcce70d60a598c32ee00e71542e52e27c978e5f8219fae0d4ac6e2864/kiwisolver-1.0.1.tar.gz
Requirement already satisfied: numpy>=1.7.1 in c:\users\12345\appdata\local\programs\python\python37\lib\site-packages (from matplotlib==2.2.2) (1.14.3+mkl)
Requirement already satisfied: setuptools in c:\users\12345\appdata\local\programs\python\python37\lib\site-packages (from kiwisolver>=1.0.1->matplotlib==2.2.2) (39.0.1)
Installing collected packages: kiwisolver, matplotlib
 Running setup.py install for kiwisolver ... done
Successfully installed kiwisolver-1.0.1 matplotlib-2.2.2

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持【听图阁-专注于Python设计】。

相关文章

Python中使用双下划线防止类属性被覆盖问题

Python中使用双下划线防止类属性被覆盖问题

在使用Python编写面向对象的代码时,我们会常常使用“继承”这种开发方式。例如下面这一段代码: class Info: def __init__(self): pass...

python登录QQ邮箱发信的实现代码

复制代码 代码如下:# -*- coding: cp936 -*-from email.Header import Headerfrom email.MIMEText import MI...

一些Python中的二维数组的操作方法

需要在程序中使用二维数组,网上找到一种这样的用法:   #创建一个宽度为3,高度为4的数组 #[[0,0,0], # [0,0,0], # [0,0,0], # [0,...

在Python的Django框架中更新数据库数据的方法

先使用一些关键参数创建对象实例,如下: >>> p = Publisher(name='Apress', ... address='2855 Telegra...

pytorch GAN伪造手写体mnist数据集方式

pytorch GAN伪造手写体mnist数据集方式

一,mnist数据集 形如上图的数字手写体就是mnist数据集。 二,GAN原理(生成对抗网络) GAN网络一共由两部分组成:一个是伪造器(Generator,简称G),一个是判别器(...