<?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: import xlrd error in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/import-xlrd-error/m-p/198651#M15266</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's true, but if you put it in the site package folder, then you don't have to mess with that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Aug 2014 15:04:13 GMT</pubDate>
    <dc:creator>AndrewChapkowski</dc:creator>
    <dc:date>2014-08-28T15:04:13Z</dc:date>
    <item>
      <title>import xlrd error</title>
      <link>https://community.esri.com/t5/python-questions/import-xlrd-error/m-p/198646#M15261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having an issue connecting a script i developed in IDLE with a Tool in ArcCatalog. Here is the import statement from the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;from xlrd import open_workbook&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;import xlwt&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;from xlutils.copy import copy&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;import arcpy&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;import subprocess&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...and so on. The script works fine in IDLE, but the error I get while trying to run the tool in ArcCatalog is "ImportError: No module named xlrd"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I imagine this has something to do with where this library is located on my machine, e.g. it isnt found in the places Arc would want it to be. Here is where I have xlrd, xlwt, and xlutils folders saved on my machine: (I'm running 10.1 btw)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;C:\Python27\ArcGISx6410.1\Lib&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This obviously differs from where arcpy is saved, but it is the same general location of plenty of the other native python libraries are.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thoughts on where I should put these libraries so that Arc will "see" them?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Aug 2014 16:15:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-xlrd-error/m-p/198646#M15261</guid>
      <dc:creator>LeifZumstein</dc:creator>
      <dc:date>2014-08-14T16:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: import xlrd error</title>
      <link>https://community.esri.com/t5/python-questions/import-xlrd-error/m-p/198647#M15262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did get it to work if I stored the libraries into the same directory as the parent script, but does this have to be the case? Is there a place I can store xlrd/xlwt/xlutils that is not within the parent script directory?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Aug 2014 17:11:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-xlrd-error/m-p/198647#M15262</guid>
      <dc:creator>LeifZumstein</dc:creator>
      <dc:date>2014-08-14T17:11:40Z</dc:date>
    </item>
    <item>
      <title>Re: import xlrd error</title>
      <link>https://community.esri.com/t5/python-questions/import-xlrd-error/m-p/198648#M15263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have two versions on python installed on your box it seems, a 32-bit and 64-bit version of python.&amp;nbsp; You'll need to install the package in both location.&amp;nbsp; By default, desktop uses the 32-bit version, which the default location is: C:\Python27\ArcGIS10.1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can install the package/modules in the site-package directory:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C:\Python27\ArcGIS10.2\Lib\site-packages&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C:\Python27\ArcGISx6410.2\Lib\site-packages&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even better use pip to install your python package for you from pypi site.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Aug 2014 18:14:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-xlrd-error/m-p/198648#M15263</guid>
      <dc:creator>AndrewChapkowski</dc:creator>
      <dc:date>2014-08-14T18:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: import xlrd error</title>
      <link>https://community.esri.com/t5/python-questions/import-xlrd-error/m-p/198649#M15264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for response Andrew. I put those three modules in the "...\site-packages" directory in both the 32 bit and 64 bit versions and the tool was able to "see" them!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do find it a bit odd that modules are located in multiple locations, but hey if it works it works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Aug 2014 13:11:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-xlrd-error/m-p/198649#M15264</guid>
      <dc:creator>LeifZumstein</dc:creator>
      <dc:date>2014-08-15T13:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: import xlrd error</title>
      <link>https://community.esri.com/t5/python-questions/import-xlrd-error/m-p/198650#M15265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually, you can have python libraries or modules in any directory.&amp;nbsp; You just have to add them to the PYTHONPATH so that python can find them.&amp;nbsp; &lt;A href="http://stackoverflow.com/questions/3402168/permanently-add-a-directory-to-pythonpath" title="http://stackoverflow.com/questions/3402168/permanently-add-a-directory-to-pythonpath"&gt;python - Permanently add a directory to PYTHONPATH - Stack Overflow&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Aug 2014 13:19:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-xlrd-error/m-p/198650#M15265</guid>
      <dc:creator>NilsBabel</dc:creator>
      <dc:date>2014-08-15T13:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: import xlrd error</title>
      <link>https://community.esri.com/t5/python-questions/import-xlrd-error/m-p/198651#M15266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's true, but if you put it in the site package folder, then you don't have to mess with that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 15:04:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/import-xlrd-error/m-p/198651#M15266</guid>
      <dc:creator>AndrewChapkowski</dc:creator>
      <dc:date>2014-08-28T15:04:13Z</dc:date>
    </item>
  </channel>
</rss>

