I have the same error when trying to import any external library in Python :
import sklearn
runfile('C:/Users/pc/.spyder-py3/temp.py', wdir='C:/Users/pc/.spyder-py3')
Traceback (most recent call last):
File ~\.spyder-py3\temp.py:1 in <module>
import sklearn
File ~\AppData\Roaming\Python\Python39\site-packages\sklearn\__init__.py:80 in <module>
from . import _distributor_init # noqa: F401
File ~\AppData\Roaming\Python\Python39\site-packages\sklearn\_distributor_init.py:22 in <module>
WinDLL(op.abspath(vcomp140_dll_filename))
File ~\anaconda3\lib\ctypes\__init__.py:382 in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 n’est pas une application Win32 valide
I tried uninstalling and reinstalling the libraries first, then did the same for Python. It didn't work.