<?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: Python: No module named arcpy 2020 in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-no-module-named-arcpy-2020/m-p/1139891#M63643</link>
    <description>&lt;P&gt;Are we right-clicking on SpatialRef.py? In PyCharm or within a file explorer window? Either way, I don't have the option to Open with IDLE ArcGIS Pro.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 02 Feb 2022 16:07:06 GMT</pubDate>
    <dc:creator>TaraWallace</dc:creator>
    <dc:date>2022-02-02T16:07:06Z</dc:date>
    <item>
      <title>Python: No module named arcpy 2020</title>
      <link>https://community.esri.com/t5/python-questions/python-no-module-named-arcpy-2020/m-p/479425#M37489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am taking the Python for Everyone course, at Step 4, Run a script in Python and am getting the following error:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;ImportError: No module named arcpy&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I did see that students had this issue back in 2015. Not sure if the move to ArcGIS Pro is the issue here as I don't even have that open and am working in PyCharm (downloaded this morning).&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Script and error message:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #8c8c8c; font-style: italic;"&gt;#import modules
&lt;/SPAN&gt;&lt;SPAN style="color: #0033b3;"&gt;import &lt;/SPAN&gt;sys
&lt;SPAN style="color: #0033b3;"&gt;import &lt;/SPAN&gt;os
&lt;SPAN style="color: #0033b3;"&gt;print &lt;/SPAN&gt;(sys.executable)
&lt;SPAN style="color: #0033b3;"&gt;print&lt;/SPAN&gt;(sys.prefix)
&lt;SPAN style="color: #0033b3;"&gt;print&lt;/SPAN&gt;(&lt;SPAN style="color: #067d17;"&gt;"PYTHONPATH: " &lt;/SPAN&gt;+ os.environ[&lt;SPAN style="color: #067d17;"&gt;"PYTHONPATH"&lt;/SPAN&gt;])
&lt;SPAN style="color: #0033b3;"&gt;print&lt;/SPAN&gt;(&lt;SPAN style="color: #067d17;"&gt;"sys.path:"&lt;/SPAN&gt;)
&lt;SPAN style="color: #0033b3;"&gt;print&lt;/SPAN&gt;(&lt;SPAN style="color: #067d17;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #0037a6;"&gt;\n&lt;/SPAN&gt;&lt;SPAN style="color: #067d17;"&gt;"&lt;/SPAN&gt;.join(sys.path))
&lt;SPAN style="color: #0033b3;"&gt;import &lt;/SPAN&gt;arcpy

&lt;SPAN style="color: #8c8c8c; font-style: italic;"&gt;#set workspace
&lt;/SPAN&gt;arcpy.env.workspace = &lt;SPAN style="color: #067d17;"&gt;r"C:\EsriTraining\Python\PythEveryone\RunningScripts\Polk_County\OregonPolk.gdb"
&lt;/SPAN&gt;&lt;SPAN style="color: #067d17;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #8c8c8c; font-style: italic;"&gt;#set up a describe object for each fc in geodatabase
&lt;/SPAN&gt;fcList = arcpy.ListFeatureClasses()
&lt;SPAN style="color: #0033b3;"&gt;for &lt;/SPAN&gt;fc &lt;SPAN style="color: #0033b3;"&gt;in &lt;/SPAN&gt;fcList:
    desc = arcpy.Describe(fc)
    &lt;SPAN style="color: #0033b3;"&gt;print &lt;/SPAN&gt;(desc.spatialReference.name)

&lt;SPAN style="color: #0033b3;"&gt;print &lt;/SPAN&gt;(&lt;SPAN style="color: #067d17;"&gt;"Script completed"&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR MESSAGE:&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;&amp;nbsp; File "C:/EsriTraining/Python/PythEveryone/RunningScripts/Polk_County/SpatialRef.py", line 9, in &amp;lt;module&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; import arcpy&lt;BR /&gt;ImportError: No module named arcpy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:09:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-no-module-named-arcpy-2020/m-p/479425#M37489</guid>
      <dc:creator>ValerieVuyovich_Connolly</dc:creator>
      <dc:date>2021-12-11T21:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: Python: No module named arcpy 2020</title>
      <link>https://community.esri.com/t5/python-questions/python-no-module-named-arcpy-2020/m-p/479426#M37490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your IDE is probably tied to a different library. It can become a bit of a nightmare.&lt;/P&gt;&lt;P&gt;I'd suggest either running the code in an ArcGIS Pro or arcmap python window, or right-clicking on your .py file and selecting 'Open with IDLE ArcGIS Pro' or similar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 May 2020 16:45:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-no-module-named-arcpy-2020/m-p/479426#M37490</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2020-05-09T16:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: Python: No module named arcpy 2020</title>
      <link>https://community.esri.com/t5/python-questions/python-no-module-named-arcpy-2020/m-p/1139891#M63643</link>
      <description>&lt;P&gt;Are we right-clicking on SpatialRef.py? In PyCharm or within a file explorer window? Either way, I don't have the option to Open with IDLE ArcGIS Pro.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Feb 2022 16:07:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-no-module-named-arcpy-2020/m-p/1139891#M63643</guid>
      <dc:creator>TaraWallace</dc:creator>
      <dc:date>2022-02-02T16:07:06Z</dc:date>
    </item>
  </channel>
</rss>

