arcpy (actually arcgisscripting which it wraps) extends a specific version of python. At arcgis 10.0 you need to run with python26. I'd make sure all the versions are matching.
Instead of doing this
C:\> test.py
Do this
C:\> C:\python26\Desktop10.0\python.exe test.py
Then you know it's starting the correct version of python. If that second line works, what's happening is that windows is starting python25, you'll need to do one of these
1) update windows file association for .py files (quick/technical)
2) uninstall python25 & 26 and install from the install disk (still pretty quick, less technical)
I haven't had too much trouble using arcpy on linux so far.
I installed arcgis into the arc users home (this was the default location, and it was recommended one install as the arc user).
As mentioned above in .../arcgis/server/tools you will find a 'python' executable. If you look at that file, you'll see how to run arc's concept of python on linux.
To run arcpy scripts on my RHEL 6 servers this is what I do:
In ~/bin:
ln -s /path/to/myarcpyexecutable arcpython
I found I didn't need much of what was in the original bash script, mine looks like this:
#!/bin/bash
installDir=/home/arc/arcgis/server
arcenv=$installDir/framework/etc/arcenv
if [ -f $arcenv ]; then
. $arcenv
if [ "x$DISPLAY" = "x" ]; then
. $installDir/framework/runtime/xvfb/init_Xvfb.sh
StartXvfb > /dev/null 2>&1
fi
wine "C:/Python27/ArcGISx6410.1/python.exe" $*
else
echo "Unable to set up environment. Cannot find $arcenv"
fi
Any python script I want to run I put
#!/home/arc/bin/arcpython
at the top and then can run it like so:
./sync_replicas.py
/home/arc/bin is first on my path, so I just use 'arcpython script.py' to run anything else. You could link 'python' to the arc version of python if you wanted, but I have that running python 2.7, and generally use virtualenvs for all my non-arcpy python stuff.
This is working quite well so far for me. I don't need to use sudo, and most things work as you'd expect (linux paths for example), the main annoyance is that I could never get it to work with ipython.
It is a bit awkward, but nothing compared to having to work on windows!
Best Answer
History logs are stored in
C:\Users\<user name>\AppData\(Local or LocalLow or Roaming)\ESRI\Desktop10.1\ArcToolbox\History
but to save log history, you have to activate it, using this code :
EDIT:
For Arcgis 10.0 ArcPy do not support
SetLogHistory()
, so you have to activate it manually like described in this link