<?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 Importing arcpy fails with ArcGIS Engine Runtime for Linux in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/importing-arcpy-fails-with-arcgis-engine-runtime/m-p/2041#M184</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have an ArcGIS Engine Runtime 10.1 SP1 for Linux installation on RHEL 6 x86_64, and while I am able to run Java ArcObjects code without problems, I cannot seem to get arcpy to import using the packaged python interpreter.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My $DISPLAY variable is set correctly and I believe I am sourcing the required files ($ENGINE_HOME/vmw/setenv_mw.sh and $ENGINE_HOME/python27/setenv_python.sh).&amp;nbsp; I'm using the python interpreter packaged with arcpy:&amp;nbsp; $ENGINE_HOME/python27/bin/python.&amp;nbsp; I have all the required packages installed (the ones listed under the "Linux" link at the bottom of this page: &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/system-requirements/10.1/index.html#//015100000068000000" rel="nofollow noopener noreferrer" target="_blank"&gt;http://resources.arcgis.com/en/help/system-requirements/10.1/index.html#//015100000068000000&lt;/A&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the output:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;[arcengine@nimbus engine10.1]$ ./python27/bin/python
Python 2.7.2 (default, Feb 23 2012, 12:21:12)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-51)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
&amp;gt;&amp;gt;&amp;gt; import arcpy
Traceback (most recent call last):
&amp;nbsp; File "&amp;lt;stdin&amp;gt;", line 1, in &amp;lt;module&amp;gt;
&amp;nbsp; File "/usr/local/esri/arcgis/engine10.1/python27/lib/python2.7/site-packages/arcpy/arcpy/__init__.py", line 21, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; from arcpy.geoprocessing import gp
&amp;nbsp; File "/usr/local/esri/arcgis/engine10.1/python27/lib/python2.7/site-packages/arcpy/arcpy/geoprocessing/__init__.py", line 14, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; from _base import *
&amp;nbsp; File "/usr/local/esri/arcgis/engine10.1/python27/lib/python2.7/site-packages/arcpy/arcpy/geoprocessing/_base.py", line 592, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; env = GPEnvironments(gp)
&amp;nbsp; File "/usr/local/esri/arcgis/engine10.1/python27/lib/python2.7/site-packages/arcpy/arcpy/geoprocessing/_base.py", line 589, in GPEnvironments
&amp;nbsp;&amp;nbsp;&amp;nbsp; return GPEnvironment(geoprocessor)
&amp;nbsp; File "/usr/local/esri/arcgis/engine10.1/python27/lib/python2.7/site-packages/arcpy/arcpy/geoprocessing/_base.py", line 545, in __init__
&amp;nbsp;&amp;nbsp;&amp;nbsp; self._refresh()
&amp;nbsp; File "/usr/local/esri/arcgis/engine10.1/python27/lib/python2.7/site-packages/arcpy/arcpy/geoprocessing/_base.py", line 547, in _refresh
&amp;nbsp;&amp;nbsp;&amp;nbsp; envset = (set(env for env in self._gp.listEnvironments()))
RuntimeError: NotInitialized&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Importing arcpy works fine for ArcGIS Server 10.1 for Linux, but I can't get it to work for Engine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Has anyone gotten arcpy to import properly in Linux ArcGIS Engine Runtime 10.1?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jason&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 20:05:37 GMT</pubDate>
    <dc:creator>JasonGreenlaw</dc:creator>
    <dc:date>2021-12-10T20:05:37Z</dc:date>
    <item>
      <title>Importing arcpy fails with ArcGIS Engine Runtime for Linux</title>
      <link>https://community.esri.com/t5/python-questions/importing-arcpy-fails-with-arcgis-engine-runtime/m-p/2041#M184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have an ArcGIS Engine Runtime 10.1 SP1 for Linux installation on RHEL 6 x86_64, and while I am able to run Java ArcObjects code without problems, I cannot seem to get arcpy to import using the packaged python interpreter.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My $DISPLAY variable is set correctly and I believe I am sourcing the required files ($ENGINE_HOME/vmw/setenv_mw.sh and $ENGINE_HOME/python27/setenv_python.sh).&amp;nbsp; I'm using the python interpreter packaged with arcpy:&amp;nbsp; $ENGINE_HOME/python27/bin/python.&amp;nbsp; I have all the required packages installed (the ones listed under the "Linux" link at the bottom of this page: &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/system-requirements/10.1/index.html#//015100000068000000" rel="nofollow noopener noreferrer" target="_blank"&gt;http://resources.arcgis.com/en/help/system-requirements/10.1/index.html#//015100000068000000&lt;/A&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the output:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;[arcengine@nimbus engine10.1]$ ./python27/bin/python
Python 2.7.2 (default, Feb 23 2012, 12:21:12)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-51)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
&amp;gt;&amp;gt;&amp;gt; import arcpy
Traceback (most recent call last):
&amp;nbsp; File "&amp;lt;stdin&amp;gt;", line 1, in &amp;lt;module&amp;gt;
&amp;nbsp; File "/usr/local/esri/arcgis/engine10.1/python27/lib/python2.7/site-packages/arcpy/arcpy/__init__.py", line 21, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; from arcpy.geoprocessing import gp
&amp;nbsp; File "/usr/local/esri/arcgis/engine10.1/python27/lib/python2.7/site-packages/arcpy/arcpy/geoprocessing/__init__.py", line 14, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; from _base import *
&amp;nbsp; File "/usr/local/esri/arcgis/engine10.1/python27/lib/python2.7/site-packages/arcpy/arcpy/geoprocessing/_base.py", line 592, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; env = GPEnvironments(gp)
&amp;nbsp; File "/usr/local/esri/arcgis/engine10.1/python27/lib/python2.7/site-packages/arcpy/arcpy/geoprocessing/_base.py", line 589, in GPEnvironments
&amp;nbsp;&amp;nbsp;&amp;nbsp; return GPEnvironment(geoprocessor)
&amp;nbsp; File "/usr/local/esri/arcgis/engine10.1/python27/lib/python2.7/site-packages/arcpy/arcpy/geoprocessing/_base.py", line 545, in __init__
&amp;nbsp;&amp;nbsp;&amp;nbsp; self._refresh()
&amp;nbsp; File "/usr/local/esri/arcgis/engine10.1/python27/lib/python2.7/site-packages/arcpy/arcpy/geoprocessing/_base.py", line 547, in _refresh
&amp;nbsp;&amp;nbsp;&amp;nbsp; envset = (set(env for env in self._gp.listEnvironments()))
RuntimeError: NotInitialized&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Importing arcpy works fine for ArcGIS Server 10.1 for Linux, but I can't get it to work for Engine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Has anyone gotten arcpy to import properly in Linux ArcGIS Engine Runtime 10.1?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jason&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:05:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/importing-arcpy-fails-with-arcgis-engine-runtime/m-p/2041#M184</guid>
      <dc:creator>JasonGreenlaw</dc:creator>
      <dc:date>2021-12-10T20:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: Importing arcpy fails with ArcGIS Engine Runtime for Linux</title>
      <link>https://community.esri.com/t5/python-questions/importing-arcpy-fails-with-arcgis-engine-runtime/m-p/2042#M185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you do an "import arcengine" first - does that work?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jun 2013 22:06:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/importing-arcpy-fails-with-arcgis-engine-runtime/m-p/2042#M185</guid>
      <dc:creator>KevinHibma</dc:creator>
      <dc:date>2013-06-03T22:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: Importing arcpy fails with ArcGIS Engine Runtime for Linux</title>
      <link>https://community.esri.com/t5/python-questions/importing-arcpy-fails-with-arcgis-engine-runtime/m-p/2043#M186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No, that also seems to fail, but with Error 999999:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;[arcengine@nimbus engine10.1]$ ./python27/bin/python
Python 2.7.2 (default, Feb 23 2012, 12:21:12)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-51)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
&amp;gt;&amp;gt;&amp;gt; import arcengine
Traceback (most recent call last):
&amp;nbsp; File "&amp;lt;stdin&amp;gt;", line 1, in &amp;lt;module&amp;gt;
&amp;nbsp; File "/usr/local/esri/arcgis/engine10.1/python27/lib/python2.7/site-packages/arcpy/arcengine.py", line 18, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.setProduct("Engine")
RuntimeError: ERROR 999999: Error executing function.
&amp;gt;&amp;gt;&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The same error also appears of I try to "import arcview" or "import arcinfo".&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:05:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/importing-arcpy-fails-with-arcgis-engine-runtime/m-p/2043#M186</guid>
      <dc:creator>JasonGreenlaw</dc:creator>
      <dc:date>2021-12-10T20:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: Importing arcpy fails with ArcGIS Engine Runtime for Linux</title>
      <link>https://community.esri.com/t5/python-questions/importing-arcpy-fails-with-arcgis-engine-runtime/m-p/2044#M187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Was this problem ever resolved?&amp;nbsp;&amp;nbsp; I am experiencing similar issues&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2015 18:48:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/importing-arcpy-fails-with-arcgis-engine-runtime/m-p/2044#M187</guid>
      <dc:creator>BrentLund</dc:creator>
      <dc:date>2015-03-20T18:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: Importing arcpy fails with ArcGIS Engine Runtime for Linux</title>
      <link>https://community.esri.com/t5/python-questions/importing-arcpy-fails-with-arcgis-engine-runtime/m-p/2045#M188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/29633"&gt;Brent Lund&lt;/A&gt;​ I believe you need to source $ENGINE_HOME/init_engine.sh. It will then take care of sourcing $ENGINE_HOME/vmw/setenv_mw.sh and $ENGINE_HOME/python27/setenv_python.sh after setting additional environment variables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2015 19:53:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/importing-arcpy-fails-with-arcgis-engine-runtime/m-p/2045#M188</guid>
      <dc:creator>GriffinMorgan1</dc:creator>
      <dc:date>2015-03-20T19:53:03Z</dc:date>
    </item>
  </channel>
</rss>

