<?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: Import arcpy problems in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/import-arcpy-problems/m-p/430446#M33831</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yep, it is just not in that location, but in program files. PyCharm is fine with the location. It is just when I go to seclude a task the windows system does not see the right install of python, so it fails on the import arcpy line. Anyway, I guess I will have to get on to our IT people who packaged Arc up for distribution within the organization and see if they changed the location...&amp;nbsp;&amp;nbsp; Thanks for the input. I am still wondering why windows will not honor me setting the path, pythonhome, and pythonpath values in the system environment to the non standard location. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 12 Mar 2016 18:50:20 GMT</pubDate>
    <dc:creator>forestknutsen1</dc:creator>
    <dc:date>2016-03-12T18:50:20Z</dc:date>
    <item>
      <title>Import arcpy problems</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-problems/m-p/430442#M33827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, I recently got a new machine and I am having some frustration importing arcpy. It works fine in PyCharm but does not work when run from the command line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An import test in IDLE:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="190834" class="jive-image image-4" src="https://community.esri.com/legacyfs/online/190834_pastedImage_3.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;From the command line:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="190836" class="image-6 jive-image" src="https://community.esri.com/legacyfs/online/190836_pastedImage_7.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="190835" class="image-5 jive-image" src="https://community.esri.com/legacyfs/online/190835_pastedImage_6.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IDLE is pointing to the wrong install of python:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="190832" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/190832_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;PyCharm is pointing to the right location which I set:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="190810" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/190810_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have set the PYTHONHOME to the ArcGIS location:&lt;/P&gt;&lt;P&gt;C:\Program Files (x86)\Python27\ArcGIS10.1 but this makes python not work at all in the cmd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="190833" class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/190833_pastedImage_2.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have also tried setting the PYTHONPATH sys values as:&lt;/P&gt;&lt;P&gt;C:\Program Files (x86)\Python27\ArcGIS10.1&lt;/P&gt;&lt;P&gt;C:\Program Files (x86)\Python27\ArcGIS10.1\DLLs&lt;/P&gt;&lt;P&gt;C:\Program Files (x86)\Python27\ArcGIS10.1\lib&lt;/P&gt;&lt;P&gt;C:\Program Files (x86)\Python27\ArcGIS10.1\lib\plat-win&lt;/P&gt;&lt;P&gt;C:\Program Files (x86)\Python27\ArcGIS10.1\lib\lib-tk&lt;/P&gt;&lt;P&gt;C:\Program Files (x86)\Python27\ArcGIS10.1&lt;/P&gt;&lt;P&gt;C:\Program Files (x86)\Python27\ArcGIS10.1\lib\site-packages&lt;/P&gt;&lt;P&gt;C:\Program Files (x86)\ArcGIS\Desktop10.1\bin&lt;/P&gt;&lt;P&gt;C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy&lt;/P&gt;&lt;P&gt;C:\Program Files (x86)\ArcGIS\Desktop10.1\ArcToolbox\Scripts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have also SET PATH=%PATH%;C:\Program Files (x86)\Python27\ArcGIS10.1 (which I recall fixing this problem in the past); however, it is now also not doing the trick.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="190837" class="image-7 jive-image" src="https://community.esri.com/legacyfs/online/190837_pastedImage_8.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;I can import arcpy using the python interpreter in the command line:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="190841" class="jive-image image-8" src="https://community.esri.com/legacyfs/online/190841_pastedImage_9.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;and it is in the module list:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="190842" class="image-9 jive-image" src="https://community.esri.com/legacyfs/online/190842_pastedImage_10.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2016 23:48:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-problems/m-p/430442#M33827</guid>
      <dc:creator>forestknutsen1</dc:creator>
      <dc:date>2016-03-11T23:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: Import arcpy problems</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-problems/m-p/430443#M33828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;at the bottom of your post and mine is a section called ... Related Content... go through those posts, since you are trying to use an unconventional installation.&amp;nbsp; Basically everything works well when ArcMap or ArcGIS Pro are allowed to install their version of python in their preferred location.&amp;nbsp; If you have previous versions already installed and want to keep them, then there are hoops you have to go through to ensure that when python is invoked through the little-used arcmap IDE that it points to the right location (which you can fix within arcmap).&amp;nbsp; The approach you want to take will depend on what works best for you given the information in all those links.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Mar 2016 00:55:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-problems/m-p/430443#M33828</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-03-12T00:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: Import arcpy problems</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-problems/m-p/430444#M33829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Dan Patterson wrote:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;since you are trying to use an unconventional installation. Basically everything works well when ArcMap or ArcGIS Pro are allowed to install their version of python in their preferred location. &lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hmmm.... this (&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;C:\Program Files (x86)\Python27\ArcGIS10.1)&lt;/SPAN&gt; is not the normal location for 10.1? This is where it shows up on my machine I have not tried to modify the arc install of it or installed other versions of python. This is a clean new build. If this is not the normal location then perhaps I have a non-standard install of arc.... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Mar 2016 18:02:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-problems/m-p/430444#M33829</guid>
      <dc:creator>forestknutsen1</dc:creator>
      <dc:date>2016-03-12T18:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: Import arcpy problems</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-problems/m-p/430445#M33830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is just for python 2.7 for 10.3... was the same in 10.1&amp;nbsp; This is just reported through pyscripter... I don't know what pycharm does, but you should have a c:\python27 directory as below (just ignore the zip files... the c:\program files are for pyscripter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Python_path.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/190864_Python_path.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what Pythonwin report which I also use (you can ignore the c:\\Program... it is for ArcGIS Pro.&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; import sys&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; sys.path&lt;/P&gt;&lt;P&gt;['', 'C:\\WINDOWS\\SYSTEM32\\python34.zip', 'C:\\Python34\\DLLs', 'C:\\Python34\\lib', 'C:\\Python34\\Lib\\site-packages\\pythonwin', 'C:\\Python34', 'C:\\Python34\\lib\\site-packages', 'C:\\Program Files\\ArcGIS\\Pro\\bin', 'C:\\Program Files\\ArcGIS\\Pro\\Resources\\ArcPy', 'C:\\Program Files\\ArcGIS\\Pro\\Resources\\ArcToolBox\\Scripts', 'C:\\Python34\\lib\\site-packages\\win32', 'C:\\Python34\\lib\\site-packages\\win32\\lib']&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Mar 2016 18:21:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-problems/m-p/430445#M33830</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-03-12T18:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: Import arcpy problems</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-problems/m-p/430446#M33831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yep, it is just not in that location, but in program files. PyCharm is fine with the location. It is just when I go to seclude a task the windows system does not see the right install of python, so it fails on the import arcpy line. Anyway, I guess I will have to get on to our IT people who packaged Arc up for distribution within the organization and see if they changed the location...&amp;nbsp;&amp;nbsp; Thanks for the input. I am still wondering why windows will not honor me setting the path, pythonhome, and pythonpath values in the system environment to the non standard location. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Mar 2016 18:50:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-problems/m-p/430446#M33831</guid>
      <dc:creator>forestknutsen1</dc:creator>
      <dc:date>2016-03-12T18:50:20Z</dc:date>
    </item>
  </channel>
</rss>

