<?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 not working in PythonWin in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/import-arcpy-not-working-in-pythonwin/m-p/740042#M57244</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to learn to Python but am stumbling at the first block.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I try to import arcpy I get the following error message:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;gt;&amp;gt;&amp;gt; import arcpy
Traceback (most recent call last):
&amp;nbsp; File "&amp;lt;interactive input&amp;gt;", line 1, in &amp;lt;module&amp;gt;
ImportError: No module named arcpy&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm sure I've imported and installed everything as I should. Any ideas?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've also tried running it in the Python window in ArcGIS. I get the following error message. I was trying to alter some code before christmas so I'm not sure if I've accidently deleted something.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Runtime error 
Traceback (most recent call last):
&amp;nbsp; File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;
&amp;nbsp; File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\__init__.py", line 24, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; from arcpy.toolbox import *
&amp;nbsp; File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\toolbox.py", line 351, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; from management import Graph, GraphTemplate
&amp;nbsp; File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\management.py", line 22, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; import _management
&amp;nbsp; File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\_management.py", line 14, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; import _graph
&amp;nbsp; File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\_graph.py", line 27, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; import numpy
ImportError: No module named numpy&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Jan 2014 15:05:07 GMT</pubDate>
    <dc:creator>GeospatialTechnology</dc:creator>
    <dc:date>2014-01-02T15:05:07Z</dc:date>
    <item>
      <title>import arcpy not working in PythonWin</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-not-working-in-pythonwin/m-p/740042#M57244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to learn to Python but am stumbling at the first block.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I try to import arcpy I get the following error message:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;gt;&amp;gt;&amp;gt; import arcpy
Traceback (most recent call last):
&amp;nbsp; File "&amp;lt;interactive input&amp;gt;", line 1, in &amp;lt;module&amp;gt;
ImportError: No module named arcpy&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm sure I've imported and installed everything as I should. Any ideas?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've also tried running it in the Python window in ArcGIS. I get the following error message. I was trying to alter some code before christmas so I'm not sure if I've accidently deleted something.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Runtime error 
Traceback (most recent call last):
&amp;nbsp; File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;
&amp;nbsp; File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\__init__.py", line 24, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; from arcpy.toolbox import *
&amp;nbsp; File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\toolbox.py", line 351, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; from management import Graph, GraphTemplate
&amp;nbsp; File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\management.py", line 22, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; import _management
&amp;nbsp; File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\_management.py", line 14, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; import _graph
&amp;nbsp; File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\_graph.py", line 27, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; import numpy
ImportError: No module named numpy&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jan 2014 15:05:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-not-working-in-pythonwin/m-p/740042#M57244</guid>
      <dc:creator>GeospatialTechnology</dc:creator>
      <dc:date>2014-01-02T15:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: import arcpy not working in PythonWin</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-not-working-in-pythonwin/m-p/740043#M57245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Perhaps you installed another version of Python other than the one that is (by default) installed with ArcGIS? BTW: Do not do that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Although it seems drastic, my recommendation is to uninstall anything and everything ArcGIS and Python related, and reinstall ArcGIS... which as I said auto installs/configures the coorect vbersion of Python. Then if you want, install the appropriate version of PythonWin. For v10.2, I believe that would be the 'pywin32-218.win32-py2.7.exe' file available here: &lt;/SPAN&gt;&lt;A href="http://sourceforge.net/projects/pywin32/files/pywin32/Build%20218/"&gt;http://sourceforge.net/projects/pywin32/files/pywin32/Build%20218/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jan 2014 16:20:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-not-working-in-pythonwin/m-p/740043#M57245</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2014-01-02T16:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: import arcpy not working in PythonWin</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-not-working-in-pythonwin/m-p/740044#M57246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Perhaps you installed another version of Python other than the one that is (by default) installed with ArcGIS? BTW: Do not do that.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Too late! That explains why it's broken. I've been messing around with Python trying to get some script to work that I copied from somewhere. I downloaded and installed a few different version of Python. Looks like a complete resinstall is in order :S&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jan 2014 10:26:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-not-working-in-pythonwin/m-p/740044#M57246</guid>
      <dc:creator>GeospatialTechnology</dc:creator>
      <dc:date>2014-01-03T10:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: import arcpy not working in PythonWin</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-not-working-in-pythonwin/m-p/740045#M57247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you installed another python, try to copy the file "C:\Python27\ArcGIS10.1\Lib\site-packages\Desktop10.1.pth" to your other python installation path like "C:\Python27\Lib\site-packages".&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jan 2014 13:26:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-not-working-in-pythonwin/m-p/740045#M57247</guid>
      <dc:creator>ZachLiu1</dc:creator>
      <dc:date>2014-01-03T13:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: import arcpy not working in PythonWin</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-not-working-in-pythonwin/m-p/740046#M57248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Zackliu. I've got arcpy working again now in ArcGIS at least. I uninstalled all previous versions of python and reinstalled python from the ArcGIS installation package.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However now PythonWin won't install. When I try i get a message saying Python 2.7 is not present even though I just installed with with ArcGIS. I'm not sure where to go from here. Like csny mentioned I think I might just go for a complete uninstall and reinstall.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jan 2014 14:46:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-not-working-in-pythonwin/m-p/740046#M57248</guid>
      <dc:creator>GeospatialTechnology</dc:creator>
      <dc:date>2014-01-03T14:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: import arcpy not working in PythonWin</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-not-working-in-pythonwin/m-p/740047#M57249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; I think I might just go for a complete uninstall and reinstall&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know it seems drastic, but just think of all the time it would have saved if you had just done this in the 1st place!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;... I speak from experience :rolleyes:&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jan 2014 16:16:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-not-working-in-pythonwin/m-p/740047#M57249</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2014-01-03T16:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: import arcpy not working in PythonWin</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-not-working-in-pythonwin/m-p/740048#M57250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;However now PythonWin won't install. When I try i get a message saying Python 2.7 is not present even though I just installed with with ArcGIS.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;For some reason, the Python installed with ArcGIS isn't properly recogniced by other installers. I think there might be some register settings that aren't properly set...&amp;nbsp; I've had the same issue when trying to run installers that required python pre-installed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(Haven't solved this myself, as I installed python on a different PC to test the module I was trying to install instead)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jan 2014 10:52:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-not-working-in-pythonwin/m-p/740048#M57250</guid>
      <dc:creator>HåvardMoe</dc:creator>
      <dc:date>2014-01-13T10:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: import arcpy not working in PythonWin</title>
      <link>https://community.esri.com/t5/python-questions/import-arcpy-not-working-in-pythonwin/m-p/740049#M57251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think you need to add it to your system path, check this post for more info:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://pythongisandstuff.wordpress.com/2013/07/10/locating-python-adding-to-path-and-accessing-arcpy/"&gt;http://pythongisandstuff.wordpress.com/2013/07/10/locating-python-adding-to-path-and-accessing-arcpy/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also ff, when attempting to install an additional library to Python, you receive an error stating that the correct Python version is not found in the registry:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;Download the package source (usually a .zip file, not specific to any Python version)&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Unzip the package&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Open a command prompt within the package folder and run:&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;python setup.py install&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;where python is the Python you want to install the library to. If it is not on the path (either temporarily or permanently) you must supply the full path to it.&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jan 2014 21:14:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-arcpy-not-working-in-pythonwin/m-p/740049#M57251</guid>
      <dc:creator>StacyRendall1</dc:creator>
      <dc:date>2014-01-13T21:14:53Z</dc:date>
    </item>
  </channel>
</rss>

