Environment error\issue


I am trying to import some new Python modules/libraries, I get “not a valid Win32 application” error message??

I assume there is an “environmental issue”.
I uninstalled and reinstalled Anaconda, but still get the OSError??

I would appreciate any assistance.


%matplotlib inline
import matplotlib.pyplot as plt

import arcgis
import numpy as np
import pandas as pd
import math

from datetime import datetime as dt
from IPython.display import Image, HTML

pip3 install scikit-learn

from sklearn.svm import SVR


Anaconda is installed at C:\ProgramData\Anaconda3
Jypter installs libraries at:\AppData\Roaming\Python\Python36\site-packages\

It runs at:
C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\

The error is:
OSError Traceback (most recent call last)
12 ## pip3 install scikit-learn
—> 14 from sklearn.svm import SVR
15 from sklearn.preprocessing import MinMaxScaler
16 from sklearn.metrics import mean_squared_error, r2_score

~\AppData\Roaming\Python\Python36\site-packages\sklearn_init_.py in
76 # later is linked to the OpenMP runtime to make it possible to introspect
77 # it and importing it first would fail if the OpenMP dll cannot be found.
—> 78 from . import _distributor_init # noqa: F401
79 from . import __check_build # noqa: F401
80 from .base import clone

~\AppData\Roaming\Python\Python36\site-packages\sklearn_distributor_init.py in
16 # Pre-load the DLL stored in sklearn/.libs by convention.
17 dll_path = op.join(op.dirname(file), ‘.libs’, ‘vcomp140.dll’)
—> 18 WinDLL(op.abspath(dll_path))

C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\ctypes_init_.py in init(self, name, mode, handle, use_errno, use_last_error)
347 if handle is None:
–> 348 self._handle = _dlopen(self._name, mode)
349 else:
350 self._handle = handle

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