<?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 Is it possible to configure the conditions for the imports for an arcpy script? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/is-it-possible-to-configure-the-conditions-for-the/m-p/404327#M31851</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a truncated logging output from a verbose run of an arcpy script with only an import of arcpy:&lt;/P&gt;&lt;P&gt;. . .&lt;/P&gt;&lt;P&gt;import re # precompiled from C:\Python27\ArcGISx6410.4\Lib\re.pyc&lt;/P&gt;&lt;P&gt;# C:\Python27\ArcGISx6410.4\Lib\sre_compile.pyc matches C:\Python27\ArcGISx6410.4\Lib\sre_compile.py&lt;/P&gt;&lt;P&gt;import sre_compile # precompiled from C:\Python27\ArcGISx6410.4\Lib\sre_compile.pyc&lt;/P&gt;&lt;P&gt;import _sre # builtin&lt;/P&gt;&lt;P&gt;# C:\Python27\ArcGISx6410.4\Lib\sre_parse.pyc matches C:\Python27\ArcGISx6410.4\Lib\sre_parse.py&lt;/P&gt;&lt;P&gt;import sre_parse # precompiled from C:\Python27\ArcGISx6410.4\Lib\sre_parse.pyc&lt;/P&gt;&lt;P&gt;# C:\Python27\ArcGISx6410.4\Lib\sre_constants.pyc matches C:\Python27\ArcGISx6410.4\Lib\sre_constants.py&lt;/P&gt;&lt;P&gt;import sre_constants # precompiled from C:\Python27\ArcGISx6410.4\Lib\sre_constants.pyc&lt;/P&gt;&lt;P&gt;import _locale # builtin&lt;/P&gt;&lt;P&gt;# C:\Python27\ArcGISx6410.4\Lib\locale.pyc matches C:\Python27\ArcGISx6410.4\Lib\locale.py&lt;/P&gt;&lt;P&gt;import locale # precompiled from C:\Python27\ArcGISx6410.4\Lib\locale.pyc&lt;/P&gt;&lt;P&gt;import encodings # directory C:\Python27\ArcGISx6410.4\Lib\encodings&lt;/P&gt;&lt;P&gt;# C:\Python27\ArcGISx6410.4\Lib\encodings\__init__.pyc matches C:\Python27\ArcGISx6410.4\Lib\encodings\__init__.py&lt;/P&gt;&lt;P&gt;import encodings # precompiled from C:\Python27\ArcGISx6410.4\Lib\encodings\__init__.pyc&lt;/P&gt;&lt;P&gt;# C:\Python27\ArcGISx6410.4\Lib\codecs.pyc matches C:\Python27\ArcGISx6410.4\Lib\codecs.py&lt;/P&gt;&lt;P&gt;import codecs # precompiled from C:\Python27\ArcGISx6410.4\Lib\codecs.pyc&lt;/P&gt;&lt;P&gt;import _codecs # builtin&lt;/P&gt;&lt;P&gt;# C:\Python27\ArcGISx6410.4\Lib\encodings\aliases.pyc matches C:\Python27\ArcGISx6410.4\Lib\encodings\aliases.py&lt;/P&gt;&lt;P&gt;import encodings.aliases # precompiled from C:\Python27\ArcGISx6410.4\Lib\encodings\aliases.pyc&lt;/P&gt;&lt;P&gt;import operator # builtin&lt;/P&gt;&lt;P&gt;# C:\Python27\ArcGISx6410.4\Lib\functools.pyc matches C:\Python27\ArcGISx6410.4\Lib\functools.py&lt;/P&gt;&lt;P&gt;import functools # precompiled from C:\Python27\ArcGISx6410.4\Lib\functools.pyc&lt;/P&gt;&lt;P&gt;import _functools # builtin&lt;/P&gt;&lt;P&gt;# C:\Python27\ArcGISx6410.4\Lib\encodings\cp1252.pyc matches C:\Python27\ArcGISx6410.4\Lib\encodings\cp1252.py&lt;/P&gt;&lt;P&gt;import encodings.cp1252 # precompiled from C:\Python27\ArcGISx6410.4\Lib\encodings\cp1252.pyc&lt;/P&gt;&lt;P&gt;Python 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)] on win32&lt;/P&gt;&lt;P&gt;Type "help", "copyright", "credits" or "license" for more information.&lt;/P&gt;&lt;P&gt;import arcpy # directory C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy&lt;/P&gt;&lt;P&gt;import arcpy # from C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\__init__.py&lt;/P&gt;&lt;P&gt;. . .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems that the python interpreter is invoked a second time within the script prior to the "import arcpy". This gives unexpected consequences when running an arcpy script on a Windows Server via remotely executed command through SSH link, OpenSSH Server installed in Cygwin environment. The script terminates immediately at the "import arcpy" call. Running the arcpy script while being logged in the arcpy script continues the execution and produces the expected output.&lt;/P&gt;&lt;P&gt;The arcpy script also works as expected when run locally on the server in a command prompt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to configure the python environment so that the arcpy import is completed and not aborted?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Jun 2016 15:22:59 GMT</pubDate>
    <dc:creator>FredricRagnar</dc:creator>
    <dc:date>2016-06-14T15:22:59Z</dc:date>
    <item>
      <title>Is it possible to configure the conditions for the imports for an arcpy script?</title>
      <link>https://community.esri.com/t5/python-questions/is-it-possible-to-configure-the-conditions-for-the/m-p/404327#M31851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a truncated logging output from a verbose run of an arcpy script with only an import of arcpy:&lt;/P&gt;&lt;P&gt;. . .&lt;/P&gt;&lt;P&gt;import re # precompiled from C:\Python27\ArcGISx6410.4\Lib\re.pyc&lt;/P&gt;&lt;P&gt;# C:\Python27\ArcGISx6410.4\Lib\sre_compile.pyc matches C:\Python27\ArcGISx6410.4\Lib\sre_compile.py&lt;/P&gt;&lt;P&gt;import sre_compile # precompiled from C:\Python27\ArcGISx6410.4\Lib\sre_compile.pyc&lt;/P&gt;&lt;P&gt;import _sre # builtin&lt;/P&gt;&lt;P&gt;# C:\Python27\ArcGISx6410.4\Lib\sre_parse.pyc matches C:\Python27\ArcGISx6410.4\Lib\sre_parse.py&lt;/P&gt;&lt;P&gt;import sre_parse # precompiled from C:\Python27\ArcGISx6410.4\Lib\sre_parse.pyc&lt;/P&gt;&lt;P&gt;# C:\Python27\ArcGISx6410.4\Lib\sre_constants.pyc matches C:\Python27\ArcGISx6410.4\Lib\sre_constants.py&lt;/P&gt;&lt;P&gt;import sre_constants # precompiled from C:\Python27\ArcGISx6410.4\Lib\sre_constants.pyc&lt;/P&gt;&lt;P&gt;import _locale # builtin&lt;/P&gt;&lt;P&gt;# C:\Python27\ArcGISx6410.4\Lib\locale.pyc matches C:\Python27\ArcGISx6410.4\Lib\locale.py&lt;/P&gt;&lt;P&gt;import locale # precompiled from C:\Python27\ArcGISx6410.4\Lib\locale.pyc&lt;/P&gt;&lt;P&gt;import encodings # directory C:\Python27\ArcGISx6410.4\Lib\encodings&lt;/P&gt;&lt;P&gt;# C:\Python27\ArcGISx6410.4\Lib\encodings\__init__.pyc matches C:\Python27\ArcGISx6410.4\Lib\encodings\__init__.py&lt;/P&gt;&lt;P&gt;import encodings # precompiled from C:\Python27\ArcGISx6410.4\Lib\encodings\__init__.pyc&lt;/P&gt;&lt;P&gt;# C:\Python27\ArcGISx6410.4\Lib\codecs.pyc matches C:\Python27\ArcGISx6410.4\Lib\codecs.py&lt;/P&gt;&lt;P&gt;import codecs # precompiled from C:\Python27\ArcGISx6410.4\Lib\codecs.pyc&lt;/P&gt;&lt;P&gt;import _codecs # builtin&lt;/P&gt;&lt;P&gt;# C:\Python27\ArcGISx6410.4\Lib\encodings\aliases.pyc matches C:\Python27\ArcGISx6410.4\Lib\encodings\aliases.py&lt;/P&gt;&lt;P&gt;import encodings.aliases # precompiled from C:\Python27\ArcGISx6410.4\Lib\encodings\aliases.pyc&lt;/P&gt;&lt;P&gt;import operator # builtin&lt;/P&gt;&lt;P&gt;# C:\Python27\ArcGISx6410.4\Lib\functools.pyc matches C:\Python27\ArcGISx6410.4\Lib\functools.py&lt;/P&gt;&lt;P&gt;import functools # precompiled from C:\Python27\ArcGISx6410.4\Lib\functools.pyc&lt;/P&gt;&lt;P&gt;import _functools # builtin&lt;/P&gt;&lt;P&gt;# C:\Python27\ArcGISx6410.4\Lib\encodings\cp1252.pyc matches C:\Python27\ArcGISx6410.4\Lib\encodings\cp1252.py&lt;/P&gt;&lt;P&gt;import encodings.cp1252 # precompiled from C:\Python27\ArcGISx6410.4\Lib\encodings\cp1252.pyc&lt;/P&gt;&lt;P&gt;Python 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)] on win32&lt;/P&gt;&lt;P&gt;Type "help", "copyright", "credits" or "license" for more information.&lt;/P&gt;&lt;P&gt;import arcpy # directory C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy&lt;/P&gt;&lt;P&gt;import arcpy # from C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\__init__.py&lt;/P&gt;&lt;P&gt;. . .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems that the python interpreter is invoked a second time within the script prior to the "import arcpy". This gives unexpected consequences when running an arcpy script on a Windows Server via remotely executed command through SSH link, OpenSSH Server installed in Cygwin environment. The script terminates immediately at the "import arcpy" call. Running the arcpy script while being logged in the arcpy script continues the execution and produces the expected output.&lt;/P&gt;&lt;P&gt;The arcpy script also works as expected when run locally on the server in a command prompt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to configure the python environment so that the arcpy import is completed and not aborted?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2016 15:22:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-it-possible-to-configure-the-conditions-for-the/m-p/404327#M31851</guid>
      <dc:creator>FredricRagnar</dc:creator>
      <dc:date>2016-06-14T15:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to configure the conditions for the imports for an arcpy script?</title>
      <link>https://community.esri.com/t5/python-questions/is-it-possible-to-configure-the-conditions-for-the/m-p/404328#M31852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you are presumably using background processing &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/executing-tools/64bit-background.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/executing-tools/64bit-background.htm"&gt;Background Geoprocessing (64-bit)—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;P&gt;are both versions of python available and installed? is this a custom install or did you use the esri supplied distributions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2016 15:37:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-it-possible-to-configure-the-conditions-for-the/m-p/404328#M31852</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-06-14T15:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to configure the conditions for the imports for an arcpy script?</title>
      <link>https://community.esri.com/t5/python-questions/is-it-possible-to-configure-the-conditions-for-the/m-p/404329#M31853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, it is the background processing package. Both ESRI supplied packages are installed and I need the background processing to utilize the x64 architecture better.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 07:06:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-it-possible-to-configure-the-conditions-for-the/m-p/404329#M31853</guid>
      <dc:creator>FredricRagnar</dc:creator>
      <dc:date>2016-06-15T07:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to configure the conditions for the imports for an arcpy script?</title>
      <link>https://community.esri.com/t5/python-questions/is-it-possible-to-configure-the-conditions-for-the/m-p/404330#M31854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hmmmm in a case like that I normally would check for a path file for the 2.7 version it is located in &lt;/P&gt;&lt;P&gt;C:\Python27\ArcGIS10.4\Lib\site-packages called called Desktop10.4.pth and in my case contains&lt;/P&gt;&lt;P&gt;C:\Program Files (x86)\ArcGIS\Desktop10.4\bin&lt;/P&gt;&lt;P&gt;C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy&lt;/P&gt;&lt;P&gt;C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcToolBox\Scripts&lt;/P&gt;&lt;P&gt;but I don't use python 2.7 with arcmap 10.4.1 since I have ArcGIS Pro installed and I use python 3.4 instead&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 11:50:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-it-possible-to-configure-the-conditions-for-the/m-p/404330#M31854</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-06-15T11:50:43Z</dc:date>
    </item>
  </channel>
</rss>

