【问题标题】:Anaconda: Python is 64 bit, numpy 32 bit -> conflict. How to get numpy 64 bitAnaconda:Python 是 64 位,numpy 是 32 位 -> 冲突。如何获得 numpy 64 位
【发布时间】:2019-11-06 18:59:38
【问题描述】:

如何将我的 Anaconda 发行版中的 numpy 从 32 位更改/升级到 64 位?

我在 Windows 10 上安装的 Anaconda 安装了 64 位版本的 Python。但它显然也安装了 32 位版本的 numpy。

(base) C:\Users\i7>python
Python 3.7.4 (default, Aug  9 2019, 18:34:13) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>   

导致:

>>> import numpy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\i7\AppData\Roaming\Python\Python37\site-packages\numpy\__init__.py", line 142, in <module>
    from . import core
  File "C:\Users\i7\AppData\Roaming\Python\Python37\site-packages\numpy\core\__init__.py", line 23, in <module>
    WinDLL(os.path.abspath(filename))
  File "C:\Users\i7\Anaconda3\lib\ctypes\__init__.py", line 364, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 is not a valid Win32 application
>>>

这是我目前拥有的

(base) C:\Users\i7>conda list | grep numpy
numpy                     1.16.5           py37h19fb1c0_0
numpy-base                1.16.5           py37hc3f5095_0
numpydoc                  0.9.1                      py_0

我相信这是我在这里报告的问题的原因

Anaconda/Orange3 produces OSError: [WinError 193] %1 is not a valid Win32 application

【问题讨论】:

    标签: python python-3.x windows numpy anaconda


    【解决方案1】:

    万一其他人遇到这个问题,我解决了这个问题。问题在于之前卸载 Python 3.7 时遗留的一些目录在此过程中没有被删除。

    File "C:\Users\i7\AppData\Roaming\Python\Python37\site-packages\numpy\__init__.py",
    

    一旦我删除了这个目录 (C:\Users\i7\AppData\Roaming\Python\Python37),它就一切正常了。信用转到如何在 Windows 10 上为 python 3.7 使用 anaconda 包? @FlyingTeller

    【讨论】:

      猜你喜欢
      • 2016-02-06
      • 1970-01-01
      • 1970-01-01
      • 2015-03-05
      • 2011-04-19
      • 2012-03-17
      • 1970-01-01
      • 2012-10-26
      • 2017-09-13
      相关资源
      最近更新 更多