<?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 Unable to import arcpy via Pycharm in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/unable-to-import-arcpy-via-pycharm/m-p/605083#M47297</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;I am trying to build python scripts in Pycharm to run in ArcGIS background processing ArcGISx6410.5. When I run a script which includes "import arcpy" I get the following Error message:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;Traceback (most recent call last):&lt;BR /&gt; File "D:/WWF - Sustainable Hydropower/FRA/Code/f1_zonal_stats.py", line 8, in &amp;lt;module&amp;gt;&lt;BR /&gt; import arcpy&lt;BR /&gt; File "C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\__init__.py", line 22, in &amp;lt;module&amp;gt;&lt;BR /&gt; from arcpy.geoprocessing import gp&lt;BR /&gt; File "C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\geoprocessing\__init__.py", line 14, in &amp;lt;module&amp;gt;&lt;BR /&gt; from _base import *&lt;BR /&gt; File "C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\geoprocessing\_base.py", line 14, in &amp;lt;module&amp;gt;&lt;BR /&gt; import arcgisscripting&lt;BR /&gt;ImportError: DLL load failed: %1 is not a valid Win32 application.&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Could anyone help me to notice and solve this problem? I am the beginner user of Pycharm so it would be good if anyone could give me the steps on more details&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Feb 2019 02:45:36 GMT</pubDate>
    <dc:creator>ArdiNur_Armanto</dc:creator>
    <dc:date>2019-02-19T02:45:36Z</dc:date>
    <item>
      <title>Unable to import arcpy via Pycharm</title>
      <link>https://community.esri.com/t5/python-questions/unable-to-import-arcpy-via-pycharm/m-p/605083#M47297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;I am trying to build python scripts in Pycharm to run in ArcGIS background processing ArcGISx6410.5. When I run a script which includes "import arcpy" I get the following Error message:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;Traceback (most recent call last):&lt;BR /&gt; File "D:/WWF - Sustainable Hydropower/FRA/Code/f1_zonal_stats.py", line 8, in &amp;lt;module&amp;gt;&lt;BR /&gt; import arcpy&lt;BR /&gt; File "C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\__init__.py", line 22, in &amp;lt;module&amp;gt;&lt;BR /&gt; from arcpy.geoprocessing import gp&lt;BR /&gt; File "C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\geoprocessing\__init__.py", line 14, in &amp;lt;module&amp;gt;&lt;BR /&gt; from _base import *&lt;BR /&gt; File "C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\geoprocessing\_base.py", line 14, in &amp;lt;module&amp;gt;&lt;BR /&gt; import arcgisscripting&lt;BR /&gt;ImportError: DLL load failed: %1 is not a valid Win32 application.&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Could anyone help me to notice and solve this problem? I am the beginner user of Pycharm so it would be good if anyone could give me the steps on more details&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2019 02:45:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unable-to-import-arcpy-via-pycharm/m-p/605083#M47297</guid>
      <dc:creator>ArdiNur_Armanto</dc:creator>
      <dc:date>2019-02-19T02:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to import arcpy via Pycharm</title>
      <link>https://community.esri.com/t5/python-questions/unable-to-import-arcpy-via-pycharm/m-p/605084#M47298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/10.3/analyze/executing-tools/64bit-background.htm" title="http://desktop.arcgis.com/en/arcmap/10.3/analyze/executing-tools/64bit-background.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Background Geoprocessing (64-bit)—Help | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would check to make sure pycharm is running the correct version of python which might be installed in assuming the 64 bit version was installed in that path.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4d4d4d; font-family: &amp;amp;quot; consolas&amp;amp;quot;,&amp;amp;quot;andale mono&amp;amp;quot;,&amp;amp;quot;lucida console&amp;amp;quot;,&amp;amp;quot;monaco&amp;amp;quot;,&amp;amp;quot;courier new&amp;amp;quot;,courier,monospace; font-size: 13.93px; font-style: normal; font-variant: normal; font-weight: bold; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;c:\Python27\ArcGISx6410.5\python.exe&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-align: left; color: #4d4d4d; text-transform: none; text-indent: 0px; letter-spacing: normal; font-size: 13.93px; font-style: normal; font-variant: normal; text-decoration: none; word-spacing: 0px; white-space: normal; orphans: 2; -webkit-text-stroke-width: 0px;"&gt;You can check for the running version of python... This example is for ArcGIS Pro nor ArcMap's version,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; sys
sys&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;executable

&lt;SPAN class="string token"&gt;'C:\\arc_pro\\bin\\Python\\envs\\arcgispro-py3\\pythonw.exe'&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Line 4 is the result for Pro, which you should be using if you really need true 64 bit capabilities&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:56:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unable-to-import-arcpy-via-pycharm/m-p/605084#M47298</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-12T01:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to import arcpy via Pycharm</title>
      <link>https://community.esri.com/t5/python-questions/unable-to-import-arcpy-via-pycharm/m-p/605085#M47299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is the result of the running version of python on my code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;import sys&lt;BR /&gt;sys.executable&lt;BR /&gt;'C:\\Python27\\ArcGISx6410.5\\pythonw.exe'&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;For the project interpreter in Pycharm, I set the path to the python.exe on Python27\ArcGISx6410.5&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2019 03:48:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unable-to-import-arcpy-via-pycharm/m-p/605085#M47299</guid>
      <dc:creator>ArdiNur_Armanto</dc:creator>
      <dc:date>2019-02-19T03:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to import arcpy via Pycharm</title>
      <link>https://community.esri.com/t5/python-questions/unable-to-import-arcpy-via-pycharm/m-p/605086#M47300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I also checked the sys.path and it seems no problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;sys.path&lt;BR /&gt;['C:\\Program Files\\JetBrains\\PyCharm Community Edition 2018.3.4\\helpers\\pydev', 'C:\\Program Files\\JetBrains\\PyCharm Community Edition 2018.3.4\\helpers\\third_party\\thriftpy', 'C:\\Program Files\\JetBrains\\PyCharm Community Edition 2018.3.4\\helpers\\pydev', 'C:\\WINDOWS\\SYSTEM32\\python27.zip', 'C:\\Python27\\ArcGISx6410.5\\DLLs', 'C:\\Python27\\ArcGISx6410.5\\lib', 'C:\\Python27\\ArcGISx6410.5\\lib\\plat-win', 'C:\\Python27\\ArcGISx6410.5\\lib\\lib-tk', 'C:\\Python27\\ArcGISx6410.5', 'C:\\Users\\User\\AppData\\Roaming\\Python\\Python27\\site-packages', 'C:\\Python27\\ArcGISx6410.5\\lib\\site-packages', 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.5\\bin', 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.5\\ArcPy', 'C:\\Program Files (x86)\\ArcGIS\\Desktop10.5\\ArcToolBox\\Scripts', 'D:\\WWF - Sustainable Hydropower\\FRA\\Code', 'D:/WWF - Sustainable Hydropower/FRA/Code']&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2019 04:39:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unable-to-import-arcpy-via-pycharm/m-p/605086#M47300</guid>
      <dc:creator>ArdiNur_Armanto</dc:creator>
      <dc:date>2019-02-19T04:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to import arcpy via Pycharm</title>
      <link>https://community.esri.com/t5/python-questions/unable-to-import-arcpy-via-pycharm/m-p/605087#M47301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will have to pass you off to...&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://resources.esri.ca/getting-technical/configure-your-python-ide-to-work-with-arcmap-and-arcgis-pro-s-arcpy" title="https://resources.esri.ca/getting-technical/configure-your-python-ide-to-work-with-arcmap-and-arcgis-pro-s-arcpy"&gt;Configure your Python IDE to work with ArcMap and ArcGIS Pro’s Arcpy&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which has some instructions that may be better.&lt;/P&gt;&lt;P&gt;I use ArcGIS Pro exclusively now and my python IDE is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;A href="https://community.esri.com/blogs/dan_patterson/2018/12/13/spyder"&gt;/blogs/dan_patterson/2018/12/13/spyder&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2019 04:59:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unable-to-import-arcpy-via-pycharm/m-p/605087#M47301</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-02-19T04:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to import arcpy via Pycharm</title>
      <link>https://community.esri.com/t5/python-questions/unable-to-import-arcpy-via-pycharm/m-p/605088#M47302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have passed this problem and already got the solution. Thanks for your help, anyway&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2019 06:51:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unable-to-import-arcpy-via-pycharm/m-p/605088#M47302</guid>
      <dc:creator>ArdiNur_Armanto</dc:creator>
      <dc:date>2019-02-19T06:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to import arcpy via Pycharm</title>
      <link>https://community.esri.com/t5/python-questions/unable-to-import-arcpy-via-pycharm/m-p/605089#M47303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So what was your solution? I just installed PyCharm, but have not yet&amp;nbsp; hooked it up to ArcGIS Pro.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2019 19:58:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unable-to-import-arcpy-via-pycharm/m-p/605089#M47303</guid>
      <dc:creator>stephenheermann</dc:creator>
      <dc:date>2019-02-20T19:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to import arcpy via Pycharm</title>
      <link>https://community.esri.com/t5/python-questions/unable-to-import-arcpy-via-pycharm/m-p/605090#M47304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Stephen,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Open PyCharm and navigate to File/Settings/Project:{a_project_name_or_Deafult}/Project Interpreter...&lt;/P&gt;&lt;P&gt;2. If the Project Interpreter is blank, click the gear icon next to the blank box to Add...&lt;/P&gt;&lt;P&gt;3. Point it to your local ArcGIS Pro installed Python location, most likely&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe&lt;/P&gt;&lt;P&gt;(Tip: you can see the ArcGIS Pro Python 3 installation location by opening the Python Command Prompt under Windows/Start/ArcGIS)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another place to configure this is under&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Run/Edit Configuration...&lt;/P&gt;&lt;P&gt;2. Under Python/Environment there is a box for Python Interpreter.&lt;/P&gt;&lt;P&gt;3. If it is not set you can add it there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once this is set you have both arcpy and conda (for working with ArcGIS Python API) available in PyCharm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#arcpy #pycharm&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2019 20:54:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unable-to-import-arcpy-via-pycharm/m-p/605090#M47304</guid>
      <dc:creator>DeanChiang</dc:creator>
      <dc:date>2019-02-27T20:54:32Z</dc:date>
    </item>
  </channel>
</rss>

