Anaconda:Python是64位,numpy是32位->冲突。如何获取Numpy 64位

如何在Anaconda发行版中将 numpy 更改/升级为32位?

我在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

lssld 回答:Anaconda:Python是64位,numpy是32位->冲突。如何获取Numpy 64位

万一其他人遇到了这个问题,我就解决了这个问题。问题出在以前的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

本文链接:https://www.f2er.com/3149596.html

大家都在问