<?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: Custom packages wtih 64-bit processing in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/custom-packages-wtih-64-bit-processing/m-p/446559#M35040</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This isn't terribly helpful, as there doesn't seem to be a completely clear solution, but here's a similar thread- &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/79087-Problem-importing-arcpy-in-ArcMap-console-64-bit-DLL-conflict"&gt;http://forums.arcgis.com/threads/79087-Problem-importing-arcpy-in-ArcMap-console-64-bit-DLL-conflict&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Jun 2013 21:40:22 GMT</pubDate>
    <dc:creator>LucasDanzinger</dc:creator>
    <dc:date>2013-06-03T21:40:22Z</dc:date>
    <item>
      <title>Custom packages wtih 64-bit processing</title>
      <link>https://community.esri.com/t5/python-questions/custom-packages-wtih-64-bit-processing/m-p/446558#M35039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a 2008R2 server with both ArcGIS Desktop 10.1 (with Background Geoprocessing) and ArcServer 10.1 installed.&amp;nbsp; I've developed a custom Python package that I deploy to C:\Python27\ArcGISx6410.1\Lib\site-packages.&amp;nbsp; I also created a PYTHONPATH environment variable pointing to this same directory.&amp;nbsp; Finally, I added C:\Python27\ArcGISx6410.1 to my PATH environment variable.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Previous to yesterday I could test my Python package within ArcMap, which is consumed through a Python Toolbox.&amp;nbsp; For reasons unknown to me, I started getting exceptions.&amp;nbsp; I boiled the problem all the way down to not even being able to 'import arcpy' within ArcMap's Python interpreter.&amp;nbsp; I was getting the exception:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Runtime error &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "D:\Python27\ArcGISx6410.1\Lib\site-packages\numpy\core\__init__.py", line 5, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; import multiarray&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ImportError: DLL load failed: %1 is not a valid Win32 application.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That's pretty serious when you can't even import arcpy within ArcMap.&amp;nbsp; Long story short, I ended up having to remove the PYTHONPATH environment variable to import arcpy successfully.&amp;nbsp; However, when I tried to run my custom tools within ArcMap exceptions were still being thrown. On a whim I copied my Python package into the 32-bit site-packages directory (C:\Python27\ArcGISx6410.1\Lib\site-packages), which got everything running again.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;While I did find solutions to the issues, I'm unclear about what caused the problem in the first place? Furthermore, I'm very unclear on why I had to deploy my package for 32-bit, as ArcMap should be using 64 bit (I have background GP turned on).&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Would life be easier if I deployed my Python package somewhere other than C:\Python27\ArcGISxxx&amp;nbsp; and then set the PYTHONPATH to that directory?&amp;nbsp; Any best practices?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Shane&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 May 2013 14:22:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/custom-packages-wtih-64-bit-processing/m-p/446558#M35039</guid>
      <dc:creator>ShaneBuscher</dc:creator>
      <dc:date>2013-05-31T14:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: Custom packages wtih 64-bit processing</title>
      <link>https://community.esri.com/t5/python-questions/custom-packages-wtih-64-bit-processing/m-p/446559#M35040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This isn't terribly helpful, as there doesn't seem to be a completely clear solution, but here's a similar thread- &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/79087-Problem-importing-arcpy-in-ArcMap-console-64-bit-DLL-conflict"&gt;http://forums.arcgis.com/threads/79087-Problem-importing-arcpy-in-ArcMap-console-64-bit-DLL-conflict&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jun 2013 21:40:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/custom-packages-wtih-64-bit-processing/m-p/446559#M35040</guid>
      <dc:creator>LucasDanzinger</dc:creator>
      <dc:date>2013-06-03T21:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: Custom packages wtih 64-bit processing</title>
      <link>https://community.esri.com/t5/python-questions/custom-packages-wtih-64-bit-processing/m-p/446560#M35041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I ended up moving my Python package out of C:\Python27\ArcGISx6410.1\Lib\site-packages and into D:\geoprocessing, then set my PYTHONPATH to search the new location.&amp;nbsp; Still not sure what sparked the problem though.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jun 2013 12:37:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/custom-packages-wtih-64-bit-processing/m-p/446560#M35041</guid>
      <dc:creator>ShaneBuscher</dc:creator>
      <dc:date>2013-06-04T12:37:18Z</dc:date>
    </item>
  </channel>
</rss>

