How To Fix "oserror: [winerror 193] %1 Is Not A Valid Win32 Application"
I am trying to get along with pandas. I am learning Python using Thonny as IDLE. I installed pandas using the pip command in my cmd. Somehow i couldnt import pandas method in my ID
Solution 1:
I was getting the same error message while importing pandas and numpy.
File"<ipython-input-2-844cb1137ef2>", line 1, in<module>import pandas as pd
File"E:\Anacond\lib\site-packages\pandas\__init__.py", line 13, in<module>
__import__(dependency)
File"***C:\Users\Dell\AppData\Roaming\Python\Python37\site-
packages\numpy\__init__.py***", line 140, in<module>
from . import _distributor_init
File"***C:\Users\Dell\AppData\Roaming\Python\Python37\site-
packages\numpy\_distributor_init.py***", line 26, in<module>WinDLL(os.path.abspath(filename))
File"E:\Anacond\lib\ctypes\__init__.py", line 356, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError193] %1is not a valid Win32 application
I installed Anaconda in E:\Anacond\ but still it was referencing to C:\Users\Dell\AppData\Roaming\Python\Python37\site-packages\numpy__init__.py I deleted the old Python Folder inside C:\Users\Dell\AppData\Roaming\ which resolved the issue.It seems like python was referencing to some old files which caused the error.
Solution 2:
Another thing might have happened. VS code automatically searches for the numpy
and other packages from predefined OS locations. You might be using the 32 bit version of numpy
instead of a 64 bit version. To fix this, you can
- Uninstall
pandas
from all OS locations. - Reinstall
pandas
if the problem persists
Post a Comment for "How To Fix "oserror: [winerror 193] %1 Is Not A Valid Win32 Application""