python安装numpy库出错_numpy安装失败-小失误
下载安装python安装工具
下载地址:http://pypi.python.org/pypi/setuptools 可以找到正确的版本进行下载。win7 32位可以下载setuptools-0.6c11.win32-py2.7.exe 。
注意:win7 64位必须使用ez_setup.py进行安装。方法是下载ez_setup.py后,在cmd下执行 python ez_setup.py,即可自动安装setuptools。目前没有直接的exe安装版本。
下载完成后双击执行安装文件,即可在D:\Program Files\python2.7\scripts下安装easy_install。包含一个easy_install.exe,然后进行环境变量设置,在系统环境变量中做如下设置:
(也就是将D:\Program Files\python2.7\scripts添加到环境变量中)
此时可以在控制台看easy_install是否安装上了。
Microsoft Windows [版本6.1.7600]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
(1):错误1:
C:\Users\zhuyupeng>easy_install
error: No urls, filenames, or requirements specified (see --help)
上面这种方式不正确,需要使用下面的方式:
C:\Users\zhuyupeng>easy_install virtualenv
Searching for virtualenv
Best match: virtualenv 1.7.2
Processing virtualenv-1.7.2-py2.7.egg
virtualenv 1.7.2 is already the active version in easy-install.pth
Installing virtualenv-script.py script to D:\Program Files\Python2.7\Scripts
Installing virtualenv.exe script to D:\Program Files\Python2.7\Scripts
Installing virtualenv.exe.manifest script to D:\Program Files\Python2.7\Scripts
Installing virtualenv-2.7-script.py script to D:\Program Files\Python2.7\Scripts
Installing virtualenv-2.7.exe script to D:\Program Files\Python2.7\Scripts
Installing virtualenv-2.7.exe.manifest script to D:\Program Files\Python2.7\Scri
pts
Using d:\program files\python2.7\lib\site-packages\virtualenv-1.7.2-py2.7.egg
Processing dependencies for virtualenv
Finished processing dependencies for virtualenv
安装lxml:
C:\Users\zhuyupeng>
(2):错误2:
如果直接使用:
easy_install lxml
C:\Users\zhuyupeng> easy_install lxml 则会出现下面问题:
ERROR:‘xslt-config’ 不是内部或外部命令
make sure the developing packages of libxml2 and libxslt are installed windows
可以使用安装.egg 文件的方式来安装:
网站上下载对应的lxml .egg 文件
然后使用下面的方式来安装:
C:\Users\zhuyupeng>easy_install D:\ProgramFiles\Python2.7\lxml-2.3.py2.7.win32.egg
注:对于*.exe 文件这样也可以安装
通过这样的方式就可以安装成功了:
可以通过在控制台输入:easy_install lxml 来查看:
Microsoft Windows [版本 6.1.7600]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
C:\Users\zhuyupeng>easy_install lxml
Searching for lxml
Best match: lxml 2.3.4
Adding lxml 2.3.4 to easy-install.pth file
Using d:\program files\python2.7\lib\site-packages
Processing dependencies for lxml
Finished processing dependencies for lxml
C:\Users\zhuyupeng>
安装了easy_install 之后安装python的库就很简单了,以后需要安装python的库的话则直接在命令行使用
easy_install + libname
2. 另外一种方法:
比如:
(1).
C:\Users\zhuyupeng>easy_install numpy
Searching for numpy
...
Processing dependencies for numpy
Finished processing dependencies for numpy
这是下载下来再安装的:
C:\Users\zhuyupeng>easy_install "D:\Program Files\Python2.7\matplotlib-1.1.0.win
32-py2.7.exe"
...
Processing dependencies for matplotlib==1.1.0
Finished processing dependencies for matplotlib==1.1.0
C:\Users\zhuyupeng>
评语:结果显示安装未成功,是搜索不到软件包的原因,截图如:
(2).因此在numpy上下载软件包,进行安装...
downLoad 1.70 version:
When you unrar the zip file and point the setup.py ,wait for a moment,and the screen will show:
安装py文件不成功,因此改变方法
(3).在http://matplotlib.org/downloads.html 上下载
利用easy_install安装,
至此安装成功!!
附一个画爱心的程序:
"""'17*x^2 - 16*|x|*y + 17*y^2 = 225'
"""
import numpy as np
import matplotlib.pyplot as plt
X = np.arange(-5.0, 5.0, 0.1)
Y = np.arange(-5.0, 5.0, 0.1)
x, y = np.meshgrid(X, Y)
f = 17 * x ** 2 - 16 * np.abs(x) * y + 17 * y ** 2 - 225
fig = plt.figure()
cs = plt.contour(x, y, f, 0, colors = 'r')
plt.show()
make it simple, make it happen
结语:对于AMD64,可能找不到兼容库。只能安装32位python...
3. 其实win下可以直接EXE:
在http://www.lfd.uci.edu/~gohlke/pythonlibs/#python-dateutil网页下载几乎所有可以用到的exe包....
出现不能引入 MutilArray情况,卸载Numpy和SciPy,重装。
python安装numpy库出错_numpy安装失败-小失误相关推荐
- python安装lxml库出错_python安装lxml出错的解决方法
python安装lxml出错的解决方法 发布时间:2020-08-07 09:44:14 来源:亿速云 阅读:71 作者:小新 这篇文章给大家分享的是有关python安装lxml出错的解决方法的内容. ...
- python的numpy库结构_NumPy构成了数据科学领域中许多Python库的基础。
关于数据科学的一切都始于数据,数据以各种形式出现.数字.图像.文本.x射线.声音和视频记录只是数据源的一些例子.无论数据采用何种格式,都需要将其转换为一组待分析的数字.因此,有效地存储和修改数字数组在 ...
- python numpy安装失败_Mac下安装Python的numpy库失败的解决方法
在安装numpy库时,出现了这样的错误: 安装命令: easy_install numpy 错误: MacdeMacBook-Pro-3:python mac$ easy_install numpy ...
- python怎么安装numpy库-python怎么安装numpy库
NumPy(Numerical Python) 是 Python 语言的一个扩展程序库,支持大量的维度数组与矩阵运算,此外也针对数组运算提供大量的数学函数库. Python官网上的发行版是不包含Num ...
- python下载numpy库_安装numpy库
1.先安装pip: 下载地址:http://pypi.python.org/pypi/pip#downloads 下载pip-8.1.2.tar.gz(md5,pgp)完成之后,解压到一个文件夹,cm ...
- pip install skimage安装skimage库出错问题
目录 pip install skimage安装skimage库出错的解决方案 安装skimage库出错 错误如下: 解决方法如下: pip install skimage安装skimage库出错的解 ...
- python numpy安装教程_手把手教你搭建机器学习开发环境—Python与NumPy的超简安装教程...
手把手教你搭建机器学习开发环境Python语言是机器学习的基础,所以,想要入门机器学习,配置好Python的开发环境是第一步.本文就手把手的教你配置好基于Python的机器学习开发环境.超简单!第一步 ...
- 如何安装numpy库
要安装numpy库,你需要先安装Python,然后打开命令行或终端并使用以下命令: pipinstall numpy 如果你使用的是Anaconda,你可以使用conda命令来安装numpy: con ...
- pip install skimage安装skimage库出错的解决办法
pip install skimage安装skimage库出错的解决办法 安装skimage库出错 pip install skimage 解决办法: pip install scikit-image
- Py之Pandas:Python的pandas库简介、安装、使用方法详细攻略
Py之Pandas:Python的pandas库简介.安装.使用方法详细攻略 目录 pandas库简介 pandas库安装 pandas库使用方法 1.函数使用方法 2.使用经验总结 3.绘图相关操作 ...
最新文章
- mysql 生成数列_PHP生成器的创建和使用
- Windows10环境下使用Anaconda安装tensorflow环境及keras环境
- 文件上传至将File转换成MultiPartFile
- 【英语学习】【Level 07】U04 Rest and Relaxation L5 An inn by the lake
- SAP License:国网面试手记
- select命名_Maya中Pymel写个带界面的重命名工具(一)
- LeetCode_16.22兰顿蚂蚁
- yaahp使用教程_yaahp(yaahp教程使用视频)
- SAS的安装过程和遇到的问题(提供安装包)
- 计算机修改wifimac,怎么修改mac地址?(手机和电脑mac地址修改方法)
- 爱数私有云盘 AnyShare 部署(一)
- 参考文献类型标识码--中英文对照
- 【定时任务】SpringBoot多线程并发动态执行定时任务
- 停止mysql服务的运行_启动和停止MySQL服务
- HTMLTestRunner测试报告定制
- java 函数参数后加throw_函数后面加throw关键字
- 设置python程序开机自启动
- “两两”求和问题技巧
- ADC 模数转换实验
- 【深度学习】深度学习:技术原理、迭代路径与局限