zoukankan      html  css  js  c++  java
  • Windows下使用命令安装Python的scipy库出错的解决

    平时使用Python都是在Sublime下使用,不想使用IDE。使用各种库时安装也就是使用pip安装即可。来说说今天自己遇到的一个问题:使用scipy数学库时,使用命令:

    pip install scipy

    后,显示正常的下载,然后是一串的文字,最后一串红色的报错警告(我不想演示了),到stackoverflow上查看解答,很多给出的是升级pip版本,也有给出的是安装python-dev。不过几乎都是Linux环境下的配置。后来Google时,调到一个网站:http://www.lfd.uci.edu/~gohlke/pythonlibs/,太神奇了。这个网站中包含了几乎所有的python下的数学库。仔细浏览了一下,在scipy处这样写道:

    SciPy is software for mathematics, science, and engineering.
    Requires numpy+mkl.

    我已经安装了numpy,但是没有mkl,难道使用

    pip install mkl

    就可以安装mkl,然后就okay了吗?

    尝试。。。。错了,没有这个鬼!!纳尼!!

    Ctrl + F 在刚才的网页中输入numpy后发现,咦,这是什么

    okay!!find it!!可是怎么安装这种文件whl.......................................................................................................

    接着看。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。

    网页的最开始有一个蓝色的链接,install the download .whl files 点击进去。奥

    https://pip.pypa.io/en/latest/user_guide/#installing-from-wheels

    搜嘎,这里有方法。点击上面numpy+mkl以及scipy中的链接,下载适合自己电脑系统的版本,cp27表示python为2.7版本的,以此类推。win32是表示电脑系统是32位的。下载到自己电脑上,比如桌面。

    cmd打开,输入

    cd Desktop                                                                    //不是桌面的就跳转到下载的文件夹下。

    pip install  numpy-1.11.1+mkl-cp27-cp27m-win32.whl

    pip install scipy-0.18.0-cp27-cp27m-win32.whl                   //下载文件的文件名,以32位,python2.7版本为例

    you can install what you like just like above method what i show you,dude!

  • 相关阅读:
    Spring AOP
    编写jQuery插件
    Linux下SVN服务器搭建
    Redis安装配置与Jedis访问数据库
    使用redis做mysql缓存
    $(document).ready(function(){})和$(window).load(function(){})的区别
    SSH三大框架简介
    docker inspect命令
    ELK 环境搭建3-Logstash
    ELK 环境搭建2-Kibana
  • 原文地址:https://www.cnblogs.com/ouyxy/p/6592969.html
Copyright © 2011-2022 走看看