POST
|
I found a solution to do what I needed to do. The set of scripts I wanted to bundle together only used the arcpy module for one search cursor and one insert cursor. I re-wrote my scripts to use the pyodbc module rather than arcpy, since the file the scripts work with is an Microsoft Access file (.mdb). Since my scripts no longer call arcpy, py2exe generated a perfectly functioning EXE. Thanks Matt and Curt for your advice. It was very helpful to me.
... View more
03-29-2013
10:00 AM
|
0
|
0
|
1166
|
POST
|
You cannot compile a python script importing arcpy into an exe. How come? If this is not possible, are there other options that would help me distribute the set of scripts and non-arcpy modules that the user needs to run it?
... View more
03-25-2013
01:32 PM
|
0
|
0
|
1166
|
POST
|
If I byte-compile my code, will it give the user any other Python modules I have that they might not (such as wxPython)? While I understand that anyone who has ArcGIS already has Python, there are other Python modules (aside from arcpy), that the users need for the script to work. Also, my script ties into three other scripts that also need to be distributed along with the main script. My intention for creating an EXE is to bundle everything needed into one place.
... View more
03-22-2013
08:12 AM
|
0
|
0
|
1166
|
POST
|
I'm trying to build an exe using py2exe. My script uses wxPython for a GUI, and arcpy for an Insert Cursor and an Update Cursor on one table inside of a personal gdb. I'm using ArcGIS 10.0 and Python 2.6, and Aptana Studio 3 + pyDev as an IDE. The script works great inside Aptana. My setup.py script executes and creates an EXE file inside of the dist folder of my project directory. When I try to run the EXE, it crashes on import of arcpy. The log file shows the following error: Traceback (most recent call last): File "redrover-hazus.py", line 66, in <module> File "zipextimporter.pyo", line 82, in load_module File "arcpy\__init__.pyo", line 17, in <module> File "zipextimporter.pyo", line 82, in load_module File "arcpy\geoprocessing\__init__.pyo", line 14, in <module> File "zipextimporter.pyo", line 82, in load_module File "arcpy\geoprocessing\_base.pyo", line 14, in <module> File "zipextimporter.pyo", line 98, in load_module ImportError: MemoryLoadLibrary failed loading arcgisscripting.pyd My setup.py script looks like this: from distutils.core import setup import py2exe, sys, os data_files = ["file1", "file2"] sys.argv.append('py2exe') setup( windows = [{'script': "script.py",'icon_resources':[(1,"icon.ico")]}], zipfile = None, data_files=data_files, options = {'py2exe': { 'includes': "arcgisscripting", 'bundle_files': 1, 'dist_dir': "dist", 'optimize': 2, } }, ) All of the users who will run this EXE will already have ArcGIS 10.0 and Python 2.6. Is there a way I can specify this in my setup.py file? -- Josh Groeneveld
... View more
03-21-2013
02:33 PM
|
0
|
7
|
4990
|
POST
|
Ok. Thanks for the info. I'll keep an eye out for 10.1.
... View more
08-04-2011
02:53 PM
|
0
|
0
|
230
|
POST
|
I made a map in ArcGIS Online, and now I want to open it in ArcMap...but I get an error message that reads: "Could not open specified file". Is there a patch / workaround for this? The latest service pack for Desktop lists this as an issue that's been fixed, but it's still not working. -Josh G.
... View more
08-04-2011
07:03 AM
|
0
|
3
|
429
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|