Newbie: Runtime error when importing arcpy

444
3
07-06-2011 02:02 PM
stephaniemay
New Contributor
Hi all,

Running ArcGIS 10.0, ArcView license, Windows 7

I am taking an initial stab at using arcpy in ArcGIS 10.0... but so far I can't get out of the gates. when I type "import arcpy" at the command line of the Python window, I get:

Runtime error <type 'exceptions.TypeError'>: cannot create weak reference to 'classobj' object

Other possibly relevant info:
- I installed Python 2.7.2 recently, completely separate from the 2.6 installation, to practice using Python outside of ArcGIS. I thought the paths might be messed up but none of my machine's environment variables make reference to either installation (under System Properties).
- arcpy exists at C:\Program Files\ArcGIS\Desktop10.0\arcpy

Any help appreciated.
S.
Tags (2)
0 Kudos
3 Replies
DanPatterson_Retired
MVP Emeritus
If you are Newbie...don't mess with mother nature...ArcMap requires a certain version of Python installed in a certain path...so uninstall the latest and greatest version of Python (which doesn't add anything you are going to need for a long time) and stick with what ArcMap requires.  When you become post-newbie, then there are lots of threads on how to temp fate with other versions and installation priorities and the like.
0 Kudos
stephaniemay
New Contributor
Ok, uninstalling 2.7.2 did indeed solve it. ArcGIS crashed two more times and imports arcpy just fine now. Thank you, although I am not sure "mother nature" has anything to do with it.
0 Kudos
DanPatterson_Retired
MVP Emeritus
you could always try to tempt her again 🙂
0 Kudos