【问题标题】:how can I update scipy in winpython on windows?如何在 Windows 上的 winpython 中更新 scipy?
【发布时间】:2017-05-09 01:43:43
【问题描述】:

我已经安装了 winpython,我想将 scipy 更新到 0.14 版本。 我怎样才能做到这一点?我应该完全重新安装winpython吗?

编辑:

如果我从WinPython Command Prompt 运行pip install --upgrade scipy,我会收到此错误:

----------------------------------------
  Rolling back uninstall of scipy
Cleaning up...
Command C:\Users\donbeo\WinPython-64bit-3.3.5.0\python-3.3.5.amd64\python.exe -c
 "import setuptools, tokenize;__file__='c:\\users\\donbeo\\appdata\\local\\temp\
\pip_build_donbeo\\scipy\\setup.py';exec(compile(getattr(tokenize, 'open', open)
(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:
\users\donbeo\appdata\local\temp\pip-puzp_i-record\install-record.txt --single-v
ersion-externally-managed --compile failed with error code 1 in c:\users\donbeo\
appdata\local\temp\pip_build_donbeo\scipy
Storing debug log for failure in C:\Users\donbeo\WinPython-64bit-3.3.5.0\setting
s\pip\pip.log

C:\Users\donbeo\WinPython-64bit-3.3.5.0\python-3.3.5.amd64>pip install --upgrade scipy

【问题讨论】:

  • 不能只用pip吗?
  • @PadraicCunningham 我已经更新了这个问题。相同的命令适用于 ubuntu。我不知道我在 Windows 上是否做错了什么。
  • Windows 安装任何东西都可能会很痛苦,我添加了一个带有预构建二进制文件链接的答案。

标签: python windows scipy


【解决方案1】:

Christoph Gohlke now provides wheels,所以从 2015 年 1 月的 Winpython 开始,您或许也可以这样做:

  • 为您的 Python 版本下载正确的 .whl 文件(例如,cp33 用于 Python 3.3,win32 用于 32 位)到某个位置,例如D:\scipy\
  • 启动 WinPython 命令提示符
  • 类型

    pip install --no-index --upgrade D:\scipy\scipy‑0.15.0‑cp33‑none‑win32.whl
    

它应该给你这样的输出,例如 Python 3.3 32-Bit:

D:\result_tests\WinPython-32bit-3.3.5.5_build5\python-3.3.5>pip install --no-index --upgrade D:\here_is_scip\scipy-0.15.0-cp33-none-win32.whl
Ignoring indexes: https://pypi.python.org/simple
Processing d:\here_is_scip\scipy-0.15.0-cp33-none-win32.whl
Installing collected packages: scipy
  Found existing installation: scipy 0.14.1
    Uninstalling scipy-0.14.1:
      Successfully uninstalled scipy-0.14.1

Successfully installed scipy-0.15.0

D:\result_tests\WinPython-32bit-3.3.5.5_build5\python-3.3.5>

【讨论】:

    【解决方案2】:

    我认为错误是因为您没有以管理员权限运行提示。找到类似 DOS 的“命令提示符”程序,然后右键单击它并选择“以管理员身份运行”。

    【讨论】:

      【解决方案3】:

      Windows 最简单的方法是使用Christoph Gohlke's 预构建的二进制文件,这也是根据wppm 推荐的安装方式:

      【讨论】:

      • 我试过了,但是我在本地文件夹中安装了python(我刚刚在一个文件夹中提取了winpython),所以无法安装来自网站的scipy,因为python不在变量路径中。有没有更简单的解决方法?
      • 能否添加winpython路径以包含系统python包或使用包管理器安装?
      • 我宁愿避免这种情况。在这种情况下,我应该给 IT 部门的人打电话。
      猜你喜欢
      • 2020-09-16
      • 1970-01-01
      • 1970-01-01
      • 2017-08-07
      • 2010-12-03
      • 2012-04-09
      • 2013-08-27
      相关资源
      最近更新 更多