OSError: [WinError 193] %1 is not a valid Win32 application - when trying to import numpy

后端 未结 4 1475
一整个雨季
一整个雨季 2021-01-14 21:02

I can install numpy or pandas, but I can\'t import them in cmd, jupyter notebook or sublime text. (However, I can install and import them in Pycharm).

I\'ve already

4条回答
  •  旧巷少年郎
    2021-01-14 21:03

    I'm using PyCharm, determined to learn the PipEnv virtualization tool(it utilizes SHA256 hashing against downloaded packages), and was experiencing this same exact error message (error 193, %1 not a valid win32 or whatever). I realize this isn't exactly your scenario however, you're using python and PyCharm so I figure it might and might help others who arrive here. Anyways...

    The way I resolved it was by: 1.) in the 'Add Python Interpreter' window (first setting up virtualization interpreter), I had to put "C:\Users\ericm\AppData\Roaming\Python\Python38\Scripts\pipenv.exe" as my "Pipenv executable'. (After doing this, I began getting a permission error when trying to utilize it) 2.) I had to add my project's path into the "Working directory" (e.x. C:\Users\ericm\OneDrive\Documents\Programming\Python\NameOfProject)

    No more errors of any kind and my app is fully working again.

提交回复
热议问题