<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ArcPro: installed sklearn but unable to import in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/arcpro-installed-sklearn-but-unable-to-import/m-p/1123645#M48787</link>
    <description>&lt;P&gt;Yes, I activated my environment. I ended up solving the issue by installing sklearn in the python command prompt without updates. First, make sure the environment is activated, then open a python command prompt. Then:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;pip install scikit-learn&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 07 Dec 2021 23:05:55 GMT</pubDate>
    <dc:creator>KayleighWilson</dc:creator>
    <dc:date>2021-12-07T23:05:55Z</dc:date>
    <item>
      <title>ArcPro: installed sklearn but unable to import</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcpro-installed-sklearn-but-unable-to-import/m-p/1108984#M46912</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to use sklearn as part of my analysis but I am running into problems importing it. I was able to successfully install scikit-learn (sklearn) into my cloned environment. The installation was successful via the command line with conda, and in the internal Python Package Manager, but both result in the same issue when I try and import sklearn. The strange part is that I am able to successfully import sklearn in my external python command prompt (in the same environment), but I am not able to import it in the python window within ArcPro. I installed the most recent patch, so I am using ArcGIS Pro 2.8.3, Python&amp;nbsp;3.7.10 [MSC v.1927 64 bit (AMD64)].&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I try to import sklearn in the python window within ArcPro, I get this error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;print(sys.version)
3.7.10 [MSC v.1927 64 bit (AMD64)]
print(sys.prefix)
C:\Users\kwilson\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone2
import sklearn
Traceback (most recent call last):
  File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;
  File "C:\Users\kwilson\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone2\lib\site-packages\sklearn\__init__.py", line 82, in &amp;lt;module&amp;gt;
    from .base import clone
  File "C:\Users\kwilson\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone2\lib\site-packages\sklearn\base.py", line 17, in &amp;lt;module&amp;gt;
    from .utils import _IS_32BIT
  File "C:\Users\kwilson\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone2\lib\site-packages\sklearn\utils\__init__.py", line 21, in &amp;lt;module&amp;gt;
    from scipy.sparse import issparse
  File "C:\Users\kwilson\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone2\lib\site-packages\scipy\__init__.py", line 136, in &amp;lt;module&amp;gt;
    from . import _distributor_init
  File "C:\Users\kwilson\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone2\lib\site-packages\scipy\_distributor_init.py", line 59, in &amp;lt;module&amp;gt;
    WinDLL(os.path.abspath(filename))
  File "C:\Users\kwilson\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone2\lib\ctypes\__init__.py", line 364, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I import sklearn in my external Python Command Prompt there are no issues:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;(arcgispro-py3-clone2) C:\Users\kwilson\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone2&amp;gt;python
Python 3.7.10 [MSC v.1927 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
&amp;gt;&amp;gt;&amp;gt; import sys
&amp;gt;&amp;gt;&amp;gt; print(sys.version)
3.7.10 [MSC v.1927 64 bit (AMD64)]
&amp;gt;&amp;gt;&amp;gt; print(sys.prefix)
C:\Users\kwilson\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone2
&amp;gt;&amp;gt;&amp;gt; import sklearn
&amp;gt;&amp;gt;&amp;gt; import scipy
&amp;gt;&amp;gt;&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The environment and versions are the same as far as I can tell. I tried following the steps from this post but was still unsuccessful: &lt;A href="https://community.esri.com/t5/water-resources-questions/archydro-wetland-identification-model-scikit-learn/m-p/1075877#M4065" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/water-resources-questions/archydro-wetland-identification-model-scikit-learn/m-p/1075877#M4065&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ultimately I would like to be able to use sklearn in Jupyter outside of ArcPro but using the same environment that I set inside ArcPro (in this case: arcgispro-py3-clone2).&lt;/P&gt;&lt;P&gt;I would greatly appreciate any suggestions! Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 19:47:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcpro-installed-sklearn-but-unable-to-import/m-p/1108984#M46912</guid>
      <dc:creator>KayleighWilson</dc:creator>
      <dc:date>2021-10-19T19:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: ArcPro: installed sklearn but unable to import</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcpro-installed-sklearn-but-unable-to-import/m-p/1109132#M46925</link>
      <description>&lt;P&gt;Have you activated your environment? With conda you can use conda activate myenv:&amp;nbsp;&lt;A href="https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#activating-an-environment" target="_blank"&gt;https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#activating-an-environment&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In ArcGIS Pro:&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/get-started/work-with-python-environments.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/arcpy/get-started/work-with-python-environments.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 09:39:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcpro-installed-sklearn-but-unable-to-import/m-p/1109132#M46925</guid>
      <dc:creator>andrei_ste</dc:creator>
      <dc:date>2021-10-20T09:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: ArcPro: installed sklearn but unable to import</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcpro-installed-sklearn-but-unable-to-import/m-p/1123645#M48787</link>
      <description>&lt;P&gt;Yes, I activated my environment. I ended up solving the issue by installing sklearn in the python command prompt without updates. First, make sure the environment is activated, then open a python command prompt. Then:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;pip install scikit-learn&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Dec 2021 23:05:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcpro-installed-sklearn-but-unable-to-import/m-p/1123645#M48787</guid>
      <dc:creator>KayleighWilson</dc:creator>
      <dc:date>2021-12-07T23:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: ArcPro: installed sklearn but unable to import</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcpro-installed-sklearn-but-unable-to-import/m-p/1182452#M56154</link>
      <description>&lt;P&gt;I'm running into an identical issue with some machines (but not all); was a solution ever found?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 19:53:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcpro-installed-sklearn-but-unable-to-import/m-p/1182452#M56154</guid>
      <dc:creator>OgnyanMoore</dc:creator>
      <dc:date>2022-06-13T19:53:42Z</dc:date>
    </item>
  </channel>
</rss>

