<?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: ArcGIS Pro 2.1: Importing arcpy from &amp;quot;outside&amp;quot;  in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcgis-pro-2-1-importing-arcpy-from-quot-outside/m-p/588333#M46110</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Dan Patterson wrote:&lt;/P&gt;Is there a reason you don't want the package distribution?&lt;/BLOCKQUOTE&gt;&lt;P&gt;I'm not at all enamored of the idea of creating and deleting conda environments &lt;EM&gt;ad hoc&lt;/EM&gt; on the C: drive. As a federal employee, write access on system disks is heavily restricted. I've used a freestanding Miniconda installation under my user profile for years precisely to avoid any unforeseen, hard-to-detect bugs resulting from security/admin conflicts with conda or other Python packages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In fact, after doing some testing on my home computer, I'm not sure if I will be able to create a new environment at all. The Python Package Manger interface seems to activate conda_uac.exe when creating a new environment. Elevated administrative privileges will very likely be needed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Jan 2018 01:20:29 GMT</pubDate>
    <dc:creator>PhilMorefield</dc:creator>
    <dc:date>2018-01-19T01:20:29Z</dc:date>
    <item>
      <title>ArcGIS Pro 2.1: Importing arcpy from "outside"</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-pro-2-1-importing-arcpy-from-quot-outside/m-p/588330#M46107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This question is a follow-up to the question asked &lt;A _jive_internal="true" href="https://community.esri.com/thread/191758-how-to-run-python-with-the-arcgis-pro-14-from-outside"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I prefer not to live in the conda environment that ships with ArcGIS Pro. In ArcGIS Desktop, I could simply copy a single .pth file to any other Python installation and then import arcpy from consoles and within scripts. At some point, this stopped working in ArcGIS Pro.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An Esri staff member previously indicated that the process of making arcpy accessible in this way would be simplified in ArcGIS Pro 2.1. Is there any update on this topic? Has anyone managed to import arcpy from ArcGIS Pro in this manner?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jan 2018 21:33:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-pro-2-1-importing-arcpy-from-quot-outside/m-p/588330#M46107</guid>
      <dc:creator>PhilMorefield</dc:creator>
      <dc:date>2018-01-18T21:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro 2.1: Importing arcpy from "outside"</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-pro-2-1-importing-arcpy-from-quot-outside/m-p/588331#M46108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nothing new&amp;nbsp; beyond what was recommended by Shaun recommended which didn't work for some.&lt;/P&gt;&lt;P&gt;2.1 ships with python 3.6.2 and the Anaconda environment it has is pretty packed and a lot of other stuff can be found on their site even if it is packaged in the esri distribution.&lt;/P&gt;&lt;P&gt;Is there a reason you don't want the package distribution?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jan 2018 22:30:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-pro-2-1-importing-arcpy-from-quot-outside/m-p/588331#M46108</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-01-18T22:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro 2.1: Importing arcpy from "outside"</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-pro-2-1-importing-arcpy-from-quot-outside/m-p/588332#M46109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unless Shaun meant ... making it easier ... was in reference to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/393257_python_package_manager.png" style="width: 620px; height: 275px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jan 2018 22:51:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-pro-2-1-importing-arcpy-from-quot-outside/m-p/588332#M46109</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-01-18T22:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro 2.1: Importing arcpy from "outside" </title>
      <link>https://community.esri.com/t5/python-questions/arcgis-pro-2-1-importing-arcpy-from-quot-outside/m-p/588333#M46110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Dan Patterson wrote:&lt;/P&gt;Is there a reason you don't want the package distribution?&lt;/BLOCKQUOTE&gt;&lt;P&gt;I'm not at all enamored of the idea of creating and deleting conda environments &lt;EM&gt;ad hoc&lt;/EM&gt; on the C: drive. As a federal employee, write access on system disks is heavily restricted. I've used a freestanding Miniconda installation under my user profile for years precisely to avoid any unforeseen, hard-to-detect bugs resulting from security/admin conflicts with conda or other Python packages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In fact, after doing some testing on my home computer, I'm not sure if I will be able to create a new environment at all. The Python Package Manger interface seems to activate conda_uac.exe when creating a new environment. Elevated administrative privileges will very likely be needed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jan 2018 01:20:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-pro-2-1-importing-arcpy-from-quot-outside/m-p/588333#M46110</guid>
      <dc:creator>PhilMorefield</dc:creator>
      <dc:date>2018-01-19T01:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro 2.1: Importing arcpy from "outside"</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-pro-2-1-importing-arcpy-from-quot-outside/m-p/588334#M46111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good points Phil.&lt;/P&gt;&lt;P&gt;Maybe &lt;A href="https://community.esri.com/people/SWalbridge-esristaff"&gt;SWalbridge-esristaff&lt;/A&gt;‌ might be able to answer.&lt;/P&gt;&lt;P&gt;This is especially important given the number of users that don't have the luxury of being able to have full admin privileges on their computers.&lt;/P&gt;&lt;P&gt;I do like the new ability to clone/delete an environment for quick testing, especially if you don't want to use command line conda.&lt;/P&gt;&lt;P&gt;Maybe this can be addressed now or during the ArcGIS Pro 2.2 Beta (starting soonish(?) )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jan 2018 01:29:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-pro-2-1-importing-arcpy-from-quot-outside/m-p/588334#M46111</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-01-19T01:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro 2.1: Importing arcpy from "outside"</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-pro-2-1-importing-arcpy-from-quot-outside/m-p/588335#M46112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The specific feature to use an external conda from within the app didn't ship with 2.1, unfortunately. That said, you do have a few options:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. If you install the program per-user, then UAC will never be invoked, and all of the conda installation will reside inside your AppData directory, and the backstage will install packages to that location.&lt;/P&gt;&lt;P&gt;2. You can create new environments, and use them, from your AppData location, by creating them with Conda. If you run something like `conda create --clone arcgispro-py3 --name my_env` from the command line, it will by default create that new environment in your user profile. You can then use it as you would any other, the only caveat with this approach being that the environment in AppData can't drive Pro itself.&lt;/P&gt;&lt;P&gt;3. You can integrate with an external conda, it just isn't as easy as it should be, and a better approach is being actively worked on.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;/P&gt;&lt;P&gt;Shaun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jan 2018 15:30:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-pro-2-1-importing-arcpy-from-quot-outside/m-p/588335#M46112</guid>
      <dc:creator>ShaunWalbridge</dc:creator>
      <dc:date>2018-01-26T15:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro 2.1: Importing arcpy from "outside" </title>
      <link>https://community.esri.com/t5/python-questions/arcgis-pro-2-1-importing-arcpy-from-quot-outside/m-p/588336#M46113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Shaun. Your reply actually helped me out, and I think my problem is basically solved. In case it's useful to others, here's what I did:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Install ArcGIS per-user, as you suggested. So the path to Pro is something like: &lt;STRONG&gt;C:\Users\Phil\ArcGIS\Pro...&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;Go into Pro and clone the&amp;nbsp;&lt;STRONG&gt;arcgispro-py3&amp;nbsp;&lt;/STRONG&gt;environment.&lt;/LI&gt;&lt;LI&gt;Open my IDE of choice (WingIDE) and point to the Python executable in the environment I just created:&amp;nbsp;&lt;STRONG&gt;arcgispro-py3-clone&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;Presto! I can import&amp;nbsp;&lt;STRONG&gt;arcpy&lt;/STRONG&gt; and go about my normal work day without worrying about breaking the root Python installation for Pro.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some notes about this process:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Uninstalling Pro and then reinstalling into a different directory is tricky. My license broke and I had to get support from Esri to get it working again.&lt;/LI&gt;&lt;LI&gt;The Python Package/Environment Manager in Pro is really, really clunky right now. Although, the clone function did work eventually.&lt;/LI&gt;&lt;LI&gt;A minor annoyance is that I have to point my CMD window to&amp;nbsp;&lt;STRONG&gt;arcgispro-py3-clone&amp;nbsp;&lt;/STRONG&gt;in order to use conda to add channels and install new packages. But overall, writing a simple .bat file is a small price to pay.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do look forward to having things more streamlined, but for now this is sufficient.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Feb 2018 18:48:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-pro-2-1-importing-arcpy-from-quot-outside/m-p/588336#M46113</guid>
      <dc:creator>PhilMorefield</dc:creator>
      <dc:date>2018-02-08T18:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro 2.1: Importing arcpy from "outside" </title>
      <link>https://community.esri.com/t5/python-questions/arcgis-pro-2-1-importing-arcpy-from-quot-outside/m-p/588337#M46114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG style="font-size: 12.0pt;"&gt;********** UPDATE **********&lt;/STRONG&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;philmorefield wrote:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Thanks Shaun. Your reply actually helped me out, and I think my problem is basically solved.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Once again, I spoke too soon. Everything seemed to be working okay, until I start trying to update packages. The &lt;STRONG&gt;numpy&lt;/STRONG&gt; package, for example, wouldn't update past 1.13.x, no matter what. I'm not satisfied with that; others might be.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;So I went back to the original post &lt;A _jive_internal="true" href="https://community.esri.com/thread/191758-how-to-run-python-with-the-arcgis-pro-14-from-outside"&gt;&lt;SPAN style="color: blue;"&gt;here&lt;/SPAN&gt;&lt;/A&gt; and gave Shaun's original instructions another try. And it worked. I can import &lt;STRONG&gt;arcpy&lt;/STRONG&gt;, update &lt;STRONG&gt;numpy&lt;/STRONG&gt;, and do whatever else I need to do. The steps are:&lt;/SPAN&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Create a clean installation of Python 3.x (I prefer Miniconda).&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Copy four files from the Python installation that comes with Pro. &lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;In my case the four files are located in: &lt;STRONG&gt;C:\Users\Phil\ArcGIS\Pro\bin\Python\envs\arcigspro-py3\Lib\site-packages&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;The file names are:&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG style="font-size: 12.0pt;"&gt;ArcGISPro.pth&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG style="font-size: 12.0pt;"&gt;arcgisscripting.pyd&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG style="font-size: 12.0pt;"&gt;arcpy_wmx.pyd&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG style="font-size: 12.0pt;"&gt;gapy.pyd&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Paste the files into your clean installation of Python 3.x.&lt;/SPAN&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;In my case the destination folder is: &lt;STRONG&gt;C:\Users\Phil\Miniconda3\Lib\site-packages&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;And that's it. So far I've done this on two computers and it seems to be working for both.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Feb 2018 14:34:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-pro-2-1-importing-arcpy-from-quot-outside/m-p/588337#M46114</guid>
      <dc:creator>PhilMorefield</dc:creator>
      <dc:date>2018-02-09T14:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro 2.1: Importing arcpy from "outside"</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-pro-2-1-importing-arcpy-from-quot-outside/m-p/588338#M46115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Phil, using this approach are also also able to run Jupyter notebook. Can you install other open source libraries such as GDAL, geopandas, cartopy etc also still be able to use arcpy? That is, mix and match arcpy with other open source libraries in the same script.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Feb 2018 17:19:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-pro-2-1-importing-arcpy-from-quot-outside/m-p/588338#M46115</guid>
      <dc:creator>BidhyanandaYadav</dc:creator>
      <dc:date>2018-02-09T17:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro 2.1: Importing arcpy from "outside" </title>
      <link>https://community.esri.com/t5/python-questions/arcgis-pro-2-1-importing-arcpy-from-quot-outside/m-p/588339#M46116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Bidhyananda Yadav wrote:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Phil, using this approach are also also able to run Jupyter notebook. Can you install other open source libraries such as GDAL, geopandas, cartopy etc also still be able to use arcpy? That is, mix and match arcpy with other open source libraries in the same script.&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yes. &lt;/P&gt;&lt;P&gt;Following the steps I laid out means you will have a standalone Python installation that is independent of ArcGIS Pro, i.e., you won't "break" ArcGIS Pro by installing or updating packages. But, you&amp;nbsp;&lt;STRONG&gt;will&lt;/STRONG&gt; be able import arcpy into scripts just like any other Python package. To be fair, I haven't used arcpy in Jupyter yet, but I've done all of my work for years with this type of set up and never had a conflict with arcpy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Feb 2018 21:19:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-pro-2-1-importing-arcpy-from-quot-outside/m-p/588339#M46116</guid>
      <dc:creator>PhilMorefield</dc:creator>
      <dc:date>2018-02-09T21:19:28Z</dc:date>
    </item>
  </channel>
</rss>

