Python 3.4 will be supported with ArcGIS for Professionals
Hi All-
I just installed ArcGIS 10.3 and now pythonwin is giving me an error message:
Python Traceback
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Python27\ArcGIS10.2\Lib\site-packages\Pythonwin\pywin\framework\startup.py", line 49, in <module>
__import__(moduleName)
File "C:\Python27\ArcGIS10.2\Lib\site-packages\Pythonwin\pywin\framework\intpyapp.py", line 3, in <module>
import win32con
ImportError: No module named win32con
Any ideas on how to fix this??? Google is not helping...
Thanks!
Jessica
Hi Jessica,
Same problem, I am getting our IT group to look at this, but wondered if you had an answer. I assume it is because the ArcGIS libraries have moved to C:\Python27\ArcGIS10.3\Lib\site-packages\ but can't get PyWin to work to get to this....
John
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "pywin\framework\startup.py", line 49, in <module>
__import__(moduleName)
File "C:\Python27\ArcGIS10.2\Lib\site-packages\pythonwin\pywin\framework\intpyapp.py", line 3, in <module>
import win32con
ImportError: No module named win32con
Hi Jessica,
Yes the problem is that ArcGIS10.3 installs the python libraries to C:\Python27\ArcGIS10.3\Lib\
Uninstalling pywin and re-installing pywin32 (pywin32-218.win32-py2.7.exe)
The pythonwin.exe is now in the ArcGIS10.3 folder at the location below and everything works
C:\Python27\ArcGIS10.3\Lib\site-packages\pythonwin\Pythonwin.exe
John
I know this is a couple months old by now but I just upgraded to 10.3 and am getting a similar error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\__init__.py", line 21, in <module>
from arcpy.geoprocessing import gp
File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\geoprocessing\__init__.py", line 14, in <module>
from _base import *
File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\geoprocessing\_base.py", line 598, in <module>
env = GPEnvironments(gp)
File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\geoprocessing\_base.py", line 595, in GPEnvironments
return GPEnvironment(geoprocessor)
File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\geoprocessing\_base.py", line 551, in __init__
self._refresh()
File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\geoprocessing\_base.py", line 553, in _refresh
envset = (set(env for env in self._gp.listEnvironments()))
RuntimeError: NotInitialized
I am working off a concurrent license server so not sure if that could be the issue or not. Also I was utilizing PythonWin prior to the upgrade, which I prefer, however once my system was upgraded PythonWin no longer functions. Pretty much a noob at Python so please respond with as much laymans terminology as possible.
Thanks!
I had python 2.7.9, numpy and matplot lib, pyscripter and pythonwin installed on a clean brand new machine for some work I needed to do. I then installed 10.3 ... pythonwin no longer worked but Pyscripter did. I uninstalled and reinstalled pythonwin and everything now works. The only strange thing is that I now have 2 lib folders and 2 site package folders as such:
C:\Python27\Lib\site-packages what I had during the original install
C:\Python27\ArcGIS10.3\Lib\site-packages after 10.3 was installed.
with pythonwin now being installed in the last site-packages folder and removed from the former. Of course the python paths differ in both applications...but so far everything works
The top one is standalone Python.
The one with ArcGIS in the path is a whole separate Python that Esri installs when you install ArcGIS Desktop.
If you install 64 bit background processing, you'll have yet a third Python in place.
The last one installed is the one windows will run when you try to simply "execute" a .py file from the shell (cmd.exe), for example when you throw a .py at Scheduled Tasks.
Thanks. I did do the reinstall and now Python Win is opening however I am still getting the Traceback error when I try to run a script.
what is the error?
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\__init__.py", line 21, in <module>
from arcpy.geoprocessing import gp
File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\geoprocessing\__init__.py", line 14, in <module>
from _base import *
File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\geoprocessing\_base.py", line 598, in <module>
env = GPEnvironments(gp)
File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\geoprocessing\_base.py", line 595, in GPEnvironments
return GPEnvironment(geoprocessor)
File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\geoprocessing\_base.py", line 551, in __init__
self._refresh()
File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\geoprocessing\_base.py", line 553, in _refresh
envset = (set(env for env in self._gp.listEnvironments()))
RuntimeError: NotInitialized
Reinstalling Python Win didn't fix this error unfortunately
If you examine those two ...\lib\site-packages folders, I suspect that pythonwin is not installed in the one with the 10.3 root, but in the other one which is for pure python. With my installation order I had no issues. So if you can't do
>>> import arcpy
from pythonwin interactive prompt, then it is not in the correct path and you may have to reorder the python path file...since I haven't had this issues, I can't help