Quantcast
Channel: Question and Answer » arcmap
Viewing all articles
Browse latest Browse all 248

Using PyScripter with ArcPy: “import error, no module named _base”

$
0
0

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 ArcGISDesktop10.3arcpy, bin, and ArcToolboxScripts. 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)ArcGISDesktop10.3arcpyarcpy__init__.py", line 21, in <module>
    from arcpy.geoprocessing import gp
  File "C:Program Files (x86)ArcGISDesktop10.3arcpyarcpygeoprocessing__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.


Viewing all articles
Browse latest Browse all 248

Trending Articles