1

I am developing a Python script for a Toolbox that required a few libraries which I installed manually into C:\Python26\ArcGIS10.0\ and it worked just fine. To make the distribution easier, I dived into the Python installation and libraries files and ended up deleting the wrong files and messing up my installation. I fixed a few things but I don't trust that setup anymore. For example, it runs fine outside of ArcMap (from command line or PyScripter) but raises weird errors when run from ArcMap (with the same parameters) .I know that was a mistake and I should have been more careful.

FYI: The fix that I have done was to follow the advice on Esri's blog article A simple approach for including 3rd party Python libraries with your scripts : "The secret to most Python modules and packages: they’re just files. You can copy any Python library into the same folder as the .py file that imports them and it will just work". I copied the necessary library files to the same folder as my main script. Result: it's still missing libraries or gives me a "bad argument to internal function error" when run from ArcMap but works fine when run separately.

My question is: is there a way to clean up the Python configuration without uninstalling/reinstalling everything? I would like to restart with a clean config.

This may seem a bit dumb but I've been struggling with that since I messed things up...Also, if you have advice or good practices concerning this kind of things, I'd gladly hear them as I am quite new to developing on Windows...

Thanks!

1 Answer 1

0

There is no really reliable way to do what you want, the ArcGIS installer is pretty monolithic and probably a full uninstall/reinstall is the only dependable way to get back into a working state.

1
  • Thanks for the answer, that's a shame but I guess they don't expect programmers to do the mess I did! In the end I solved my initial problem simply by using the repair option rather than uninstalling/reinstalling, I don't know if that's really clean but it did the trick (at least for now).
    – 7hibault
    Commented May 26, 2014 at 13:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.