<?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 Import Arcpy error in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/import-arcpy-error/m-p/240676#M18722</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've searched the forums and the internet for an answer to this, but unfortunately I've had no luck.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm running Arc 10.1 sp1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regardless of whether I use Idle, pythonwin, pyscripter or the built in python editor window in Arc, I get the following error when I try to import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color: &amp;quot;#008000&amp;quot;; font-style: italic;"&gt;&amp;gt;&amp;gt;&amp;gt; import arcpy&lt;BR /&gt;Runtime error &lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt; File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;BR /&gt; File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\__init__.py", line 24, in &amp;lt;module&amp;gt;&lt;BR /&gt; from arcpy.toolbox import *&lt;BR /&gt; File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\toolbox.py", line 342, in &amp;lt;module&amp;gt;&lt;BR /&gt; from management import Graph, GraphTemplate&lt;BR /&gt; File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\management.py", line 22, in &amp;lt;module&amp;gt;&lt;BR /&gt; import _management&lt;BR /&gt; File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\_management.py", line 14, in &amp;lt;module&amp;gt;&lt;BR /&gt; import _graph&lt;BR /&gt; File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\_graph.py", line 27, in &amp;lt;module&amp;gt;&lt;BR /&gt; import numpy&lt;BR /&gt; File "C:\Python27\ArcGIS10.1\lib\site-packages\numpy\__init__.py", line 137, in &amp;lt;module&amp;gt;&lt;BR /&gt; import add_newdocs&lt;BR /&gt; File "C:\Python27\ArcGIS10.1\lib\site-packages\numpy\add_newdocs.py", line 9, in &amp;lt;module&amp;gt;&lt;BR /&gt; from numpy.lib import add_newdoc&lt;BR /&gt; File "C:\Python27\ArcGIS10.1\lib\site-packages\numpy\lib\__init__.py", line 4, in &amp;lt;module&amp;gt;&lt;BR /&gt; from type_check import *&lt;BR /&gt; File "C:\Python27\ArcGIS10.1\lib\site-packages\numpy\lib\type_check.py", line 8, in &amp;lt;module&amp;gt;&lt;BR /&gt; import numpy.core.numeric as _nx&lt;BR /&gt; File "C:\Python27\ArcGIS10.1\lib\site-packages\numpy\core\__init__.py", line 8, in &amp;lt;module&amp;gt;&lt;BR /&gt; import numerictypes as nt&lt;BR /&gt; File "C:\Python27\ArcGIS10.1\lib\site-packages\numpy\core\numerictypes.py", line 92, in &amp;lt;module&amp;gt;&lt;BR /&gt; from numpy.core.multiarray import typeinfo, ndarray, array, \&lt;BR /&gt;ImportError: cannot import name datetime_data&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The python installation is not a standalone one, it is the one installed when installing Arc, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;so in the python27 folder within the C drive, there is only 1 folder, this is ArcGIS10.1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Therefore I am unable to carry out the fix provided by Kimo in post #2 here&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/2158-Importing-arcpy-error?p=10859&amp;amp;viewfull=1#post10859" rel="nofollow"&gt;http://forums.arcgis.com/threads/2158-Importing-arcpy-error?p=10859&amp;amp;viewfull=1#post10859&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've also looked at the contents of the Desktop10.1.pth file and the file paths seem correct ( as specified in the Tip at the bottom of this page &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//002z00000008000000" rel="nofollow"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//002z00000008000000&lt;/A&gt;&lt;SPAN&gt; )&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have 3 lines in this file, as below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color:&amp;quot;#008000&amp;quot;;"&gt;C:\Program Files (x86)\ArcGIS\Desktop10.1\bin&lt;BR /&gt;C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy&lt;BR /&gt;C:\Program Files (x86)\ArcGIS\Desktop10.1\ArcToolbox\Scripts&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas what I can do next to try and get arcpy to be recognised?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Jul 2013 12:08:36 GMT</pubDate>
    <dc:creator>DanielHall_Ballester</dc:creator>
    <dc:date>2013-07-29T12:08:36Z</dc:date>
    <item>
      <title>Import Arcpy error</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-error/m-p/240676#M18722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've searched the forums and the internet for an answer to this, but unfortunately I've had no luck.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm running Arc 10.1 sp1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regardless of whether I use Idle, pythonwin, pyscripter or the built in python editor window in Arc, I get the following error when I try to import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color: &amp;quot;#008000&amp;quot;; font-style: italic;"&gt;&amp;gt;&amp;gt;&amp;gt; import arcpy&lt;BR /&gt;Runtime error &lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt; File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;BR /&gt; File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\__init__.py", line 24, in &amp;lt;module&amp;gt;&lt;BR /&gt; from arcpy.toolbox import *&lt;BR /&gt; File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\toolbox.py", line 342, in &amp;lt;module&amp;gt;&lt;BR /&gt; from management import Graph, GraphTemplate&lt;BR /&gt; File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\management.py", line 22, in &amp;lt;module&amp;gt;&lt;BR /&gt; import _management&lt;BR /&gt; File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\_management.py", line 14, in &amp;lt;module&amp;gt;&lt;BR /&gt; import _graph&lt;BR /&gt; File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\_graph.py", line 27, in &amp;lt;module&amp;gt;&lt;BR /&gt; import numpy&lt;BR /&gt; File "C:\Python27\ArcGIS10.1\lib\site-packages\numpy\__init__.py", line 137, in &amp;lt;module&amp;gt;&lt;BR /&gt; import add_newdocs&lt;BR /&gt; File "C:\Python27\ArcGIS10.1\lib\site-packages\numpy\add_newdocs.py", line 9, in &amp;lt;module&amp;gt;&lt;BR /&gt; from numpy.lib import add_newdoc&lt;BR /&gt; File "C:\Python27\ArcGIS10.1\lib\site-packages\numpy\lib\__init__.py", line 4, in &amp;lt;module&amp;gt;&lt;BR /&gt; from type_check import *&lt;BR /&gt; File "C:\Python27\ArcGIS10.1\lib\site-packages\numpy\lib\type_check.py", line 8, in &amp;lt;module&amp;gt;&lt;BR /&gt; import numpy.core.numeric as _nx&lt;BR /&gt; File "C:\Python27\ArcGIS10.1\lib\site-packages\numpy\core\__init__.py", line 8, in &amp;lt;module&amp;gt;&lt;BR /&gt; import numerictypes as nt&lt;BR /&gt; File "C:\Python27\ArcGIS10.1\lib\site-packages\numpy\core\numerictypes.py", line 92, in &amp;lt;module&amp;gt;&lt;BR /&gt; from numpy.core.multiarray import typeinfo, ndarray, array, \&lt;BR /&gt;ImportError: cannot import name datetime_data&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The python installation is not a standalone one, it is the one installed when installing Arc, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;so in the python27 folder within the C drive, there is only 1 folder, this is ArcGIS10.1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Therefore I am unable to carry out the fix provided by Kimo in post #2 here&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/2158-Importing-arcpy-error?p=10859&amp;amp;viewfull=1#post10859" rel="nofollow"&gt;http://forums.arcgis.com/threads/2158-Importing-arcpy-error?p=10859&amp;amp;viewfull=1#post10859&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've also looked at the contents of the Desktop10.1.pth file and the file paths seem correct ( as specified in the Tip at the bottom of this page &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//002z00000008000000" rel="nofollow"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//002z00000008000000&lt;/A&gt;&lt;SPAN&gt; )&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have 3 lines in this file, as below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color:&amp;quot;#008000&amp;quot;;"&gt;C:\Program Files (x86)\ArcGIS\Desktop10.1\bin&lt;BR /&gt;C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy&lt;BR /&gt;C:\Program Files (x86)\ArcGIS\Desktop10.1\ArcToolbox\Scripts&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas what I can do next to try and get arcpy to be recognised?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jul 2013 12:08:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-error/m-p/240676#M18722</guid>
      <dc:creator>DanielHall_Ballester</dc:creator>
      <dc:date>2013-07-29T12:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: Import Arcpy error</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-error/m-p/240677#M18723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It seems to be finding and working with parts of the arcpy site package.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It is just encountering a hitch in the git-along.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(ImportError: cannot import name datetime_data)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If removeing and reinstalling the python provided with arc does not fix it,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;it sounds like a Support Call is in order....&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jul 2013 13:23:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-error/m-p/240677#M18723</guid>
      <dc:creator>markdenil</dc:creator>
      <dc:date>2013-07-29T13:23:53Z</dc:date>
    </item>
  </channel>
</rss>

