简体   繁体   English

在 32 位 Windows 7 机器上的 Python 3.5 中安装 scipy

[英]Installing scipy in Python 3.5 on 32-bit Windows 7 Machine

I have been trying to install Scipy onto my Python 3.5 (32-bit) install on my Windows 7 machine using the pre-built binaries from: http://www.lfd.uci.edu/~gohlke/pythonlibs我一直在尝试使用来自以下网址的预构建二进制文件将 Scipy 安装到我的 Windows 7 机器上的 Python 3.5(32 位)安装上: http : //www.lfd.uci.edu/~gohlke/pythonlibs

I have, in order, installed the following libraries我按顺序安装了以下库

numpy‑1.10.1+mkl‑cp35‑none‑win32.whl
scipy‑0.16.1‑cp35‑none‑win32.whl

Then, when trying to use the installed packages I get the following erros然后,当尝试使用已安装的软件包时,我得到以下错误

from scipy import sparse
< ... Complete error trace ommitted ... >
packages\scipy\sparse\csr.py", line 13, in <module>
    from ._sparsetools import csr_tocsc, csr_tobsr, csr_count_blocks, \
ImportError: DLL load failed: The specified module could not be found.

However, if i follow the same process for Python 3.4 replacing the installers with:但是,如果我对 Python 3.4 遵循相同的过程,将安装程序替换为:

numpy‑1.10.1+mkl‑cp35‑none‑win32.whl
scipy‑0.16.1‑cp35‑none‑win32.whl

Everything seems to work.一切似乎都有效。 Are there additional dependencies or install packages that I am missing for the Python 3.5 install? Python 3.5 安装中是否缺少其他依赖项或安装包?

Make sure you pay attention to this line from the link you provided:确保您注意您提供的链接中的这一行:

Many binaries depend on NumPy-1.9+MKL and the Microsoft Visual C++ 2008 (x64, x86, and SP1 for CPython 2.6 and 2.7), Visual C++ 2010 (x64, x86, for CPython 3.3 and 3.4), or the Visual C++ 2015 (x64 and x86 for CPython 3.5) redistributable packages.许多二进制文件依赖于 NumPy-1.9+MKL 和 Microsoft Visual C++ 2008(x64、x86 和 SP1,用于 CPython 2.6 和 2.7)、Visual C++ 2010(x64、x86,用于 CPython 3.3 和 3.4)或 Visual C++ 2015( x64 和 x86(用于 CPython 3.5)可再发行包。

Download the corresponding Microsoft Visual C++ Redistributable Package which should be this one based on your description.下载相应的 Microsoft Visual C++ Redistributable Package,根据您的描述应该是 这个

I had a similar problem, can't recall the exact issue, and I download the one for my system and it worked fine.我遇到了类似的问题,想不起来确切的问题,我为我的系统下载了一个,它运行良好。 Let me know otherwise.否则让我知道。

Possibly helpful: trying to pip install scipy-0.18.0rc2-cp35-cp35m-win_amd64.whl (downloaded from http://www.lfd.uci.edu/~gohlke/pythonlibs/ ) on 64-bit windows 7 with Python 3.5 failed with a "file does not exist/not a valid wheel filename" error.可能有帮助:尝试使用 Python 3.5 在 64 位 Windows 7 上 pip install scipy-0.18.0rc2-cp35-cp35m-win_amd64.whl (从http://www.lfd.uci.edu/~gohlke/pythonlibs/下载)因“文件不存在/轮文件名无效”错误而失败。

From various hints obtained from here and elsewhere I found that renaming the file to: scipy-0.16.1-cp35-none-win_amd64.whl allowed it to install.从这里和其他地方获得的各种提示中,我发现将文件重命名为: scipy-0.16.1-cp35-none-win_amd64.whl允许它安装。

Pull up the command window (search for it in the start button), then enter拉起命令窗口(在开始按钮中搜索),然后输入

pip install numpy

and

pip install scipy‑0.16.1‑cp35‑none‑win32.whl

then it should let you know in the command window if it was successfully downloaded, if you have python 3.5.那么它应该让你在命令窗口中知道它是否成功下载,如果你有 python 3.5。

I had a question that turned out to be a duplicate of this one here:我有一个问题,结果证明这里是这个问题的重复:

ImportError: DLL load failed: when importing statsmodels 导入错误:DLL 加载失败:导入 statsmodels 时

I actually solved this and other issues related to installing packages (such as statsmodels) by using Anaconda installer for Python 3.5.实际上,我通过使用 Python 3.5 的 Anaconda 安装程序解决了与安装软件包(例如 statsmodels)相关的这个问题和其他问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM