I'm trying to use ArcPy in PyScripter. I don't have admin privileges on this computer (it's my work computer) so I have to use a portable version of PyScripter. I'm sure my boss would let me install it, but I'd rather not bother her about it unless I have to; I'd like to try to find a workaround first.
Initially, when I typed import arcpy
into PyScripter, I was getting the usual no module named arcpy
error. Then I followed the instructions listed on this site about accessing ArcPy from a portable edition of PyScripter.
I think I have my Python PATH set up correctly: it includes the paths to ArcGIS\Desktop10.3\arcpy, \bin, and \ArcToolbox\Scripts. But now, when I import arcpy
, I'm getting the following error:
Traceback (most recent call last):
File "<string>", line 301, in runcode
File "<interactive input>", 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 *
ImportError: No module named '_base'
I'm wondering if there's some conflict between my PyScript paths, and the paths that ArcMap uses when running python? When I type os.__file_
into the Python interpreter in ArcMap, it reads 'C:\\Python27\\ArcGIS10.3\\Lib\\os.pyc'
. Is that not good...?
Most similar threads suggest that I uninstall/reinstall ArcMap to see if that helps, but again, that requires administrative approval and I'd like to hold off on that until I absolutely have to, because I'd like to solve this on my own first. Especially because there's no guarantee that will work.
I'm using ArcGIS Desktop 10.3 Advanced, and PyScripter 2.6.00 x64.
sys.path
say from PyScripter? Seems like there is something messed up in your Python environment. – crmackey Jan 20 '16 at 15:00