<?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: Beginner having trouble importing arcpy in Transportation Questions</title>
    <link>https://community.esri.com/t5/transportation-questions/beginner-having-trouble-importing-arcpy/m-p/362027#M1201</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: ekociuk&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Version 10.1 and Windows 7&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Jan 2014 16:28:01 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2014-01-28T16:28:01Z</dc:date>
    <item>
      <title>Beginner having trouble importing arcpy</title>
      <link>https://community.esri.com/t5/transportation-questions/beginner-having-trouble-importing-arcpy/m-p/362025#M1199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: ekociuk&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hey everybody, I am looking at python for my first time ever, trying to follow a tutorial to create a shapefile for each unique value in my attribute table for a specific field. The tutorial suggests I write that start of my code like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;shpfile = "D:\\GIS\\Python_Exparament\\TEST_YEARS.shp"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;cursor = arcpy.SearchCursor(shpfile)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for row in cursor:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print row.YEAR&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After I write that section I get an error message saying:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "D:/GIS/Python_Exparament/py_script.py", line 1, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; import arcpy, OS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ImportError: No module named arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anybody have any idea why such a message is coming up?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your time.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jan 2014 15:56:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/beginner-having-trouble-importing-arcpy/m-p/362025#M1199</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-01-28T15:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: Beginner having trouble importing arcpy</title>
      <link>https://community.esri.com/t5/transportation-questions/beginner-having-trouble-importing-arcpy/m-p/362026#M1200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What version of ArcGIS Desktop are you using?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is your operating system?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A couple of questions to start to get a background about your problem.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jan 2014 16:25:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/beginner-having-trouble-importing-arcpy/m-p/362026#M1200</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2014-01-28T16:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: Beginner having trouble importing arcpy</title>
      <link>https://community.esri.com/t5/transportation-questions/beginner-having-trouble-importing-arcpy/m-p/362027#M1201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: ekociuk&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Version 10.1 and Windows 7&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jan 2014 16:28:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/beginner-having-trouble-importing-arcpy/m-p/362027#M1201</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-01-28T16:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: Beginner having trouble importing arcpy</title>
      <link>https://community.esri.com/t5/transportation-questions/beginner-having-trouble-importing-arcpy/m-p/362028#M1202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are you running this script in IDLE?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jan 2014 16:40:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/beginner-having-trouble-importing-arcpy/m-p/362028#M1202</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2014-01-28T16:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: Beginner having trouble importing arcpy</title>
      <link>https://community.esri.com/t5/transportation-questions/beginner-having-trouble-importing-arcpy/m-p/362029#M1203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: hua17&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello Eric,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good looking script so far!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd start by making sure you are using the right version of python on your machine (I've had this problem many times). It is possible that you have two installs. I would go to the &lt;/SPAN&gt;&lt;SPAN style="text-decoration:underline;"&gt;start menu &amp;gt; All Programs &amp;gt; ArcGIS &amp;gt; Python 2.7 &amp;gt; IDLE (Python GUI)&lt;/SPAN&gt;&lt;SPAN&gt; and use that version IDLE to run your script. &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;(Note you may have a different version of python)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;On an unrelated note: The error message looks like you have the line "import arcpy, OS" in your script. It's not necessary, but it is good practice to have that on two lines: (also, change "OS" to "os")&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import arcpy import os&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know if that works or not! Good luck!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jan 2014 16:42:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/beginner-having-trouble-importing-arcpy/m-p/362029#M1203</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-01-28T16:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: Beginner having trouble importing arcpy</title>
      <link>https://community.esri.com/t5/transportation-questions/beginner-having-trouble-importing-arcpy/m-p/362030#M1204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: ekociuk&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for the help everybody, Got er working good. It is much appreciated!! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2014 16:22:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/beginner-having-trouble-importing-arcpy/m-p/362030#M1204</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-01-30T16:22:51Z</dc:date>
    </item>
  </channel>
</rss>

