如何找到“无效的Win32应用程序”错误的根本问题?

时间:2019-07-31 13:28:56

标签: python jupyter-notebook

我正试图开始使用jupyter笔记本,但我一直收到此错误:

OSError:[WinError 193]%1不是有效的Win32应用程序

我使用PyCharm已有一段时间了,从未见过。我仔细阅读了有关anaconda的推荐安装说明,这可能是导致此问题的原因。通常,在PyCharm中工作时,我会在虚拟环境中工作,这可能也与之相关。

我的理解是,此错误来自64位和32位版本之间的冲突。我的计算机是64位的,但是我使用的python和Anaconda一样是32。使用PyCharm时,这不会引起任何问题。

我在下面的命令行中复制了错误。我当时正在跑步: “ pip安装熊猫” “蟒蛇” “进口大熊猫”

而且我重现了我在jupyter中不断遇到的错误。


Microsoft Windows [Version 10.0.17134.885]

(c) 2018 Microsoft Corporation. All rights reserved.

C:\Users\mkeith>pip install pandas

Requirement already satisfied: pandas in 

c:\users\mkeith\appdata\roaming\python\python37\site-packages (0.25.0)

Requirement already satisfied: numpy>=1.13.3 in c:\users\mkeith\appdata\roaming\python\python37\site-packages (from pandas) (1.16.4)

Requirement already satisfied: python-dateutil>=2.6.1 in c:\users\mkeith\appdata\roaming\python\python37\site-packages (from pandas) (2.8.0)

Requirement already satisfied: pytz>=2017.2 in c:\users\mkeith\appdata\roaming\python\python37\site-packages (from pandas) (2019.1)

Requirement already satisfied: six>=1.5 in c:\users\mkeith\appdata\roaming\python\python37\site-packages (from python-dateutil>=2.6.1->pandas) (1.12.0)

C:\Users\mkeith>python
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32

Type "help", "copyright", "credits" or "license" for more information.

>>> import pandas

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

  File "C:\Users\mkeith\AppData\Roaming\Python\Python37\site-

packages\pandas\__init__.py", line 11, in <module>

    __import__(dependency)

  File "C:\Users\mkeith\AppData\Roaming\Python\Python37\site-
packages\numpy\__init__.py", line 142, in <module>
    from . import core

  File "C:\Users\mkeith\AppData\Roaming\Python\Python37\site-packages\numpy\core\__init__.py", line 23, in <module>
    WinDLL(os.path.abspath(filename))

  File "C:\Program Files (x86)\Python37-32\lib\ctypes\__init__.py", line 356, in __init__
    self._handle = _dlopen(self._name, mode)

OSError: [WinError 193] %1 is not a valid Win32 application

因此,是否有任何方法可以检查我是否正在使用64位版本的pip或pandas?我该如何解决?

或者我还需要做其他事情才能使jupyter正常工作吗?

0 个答案:

没有答案