PyScripter

9685
10
Jump to solution
06-09-2015 07:34 AM
JohnWhite
New Contributor II

Greetings -

I would like to ask for some help with my install of PyScripter. I would like to start using this editor for Python scripts that import ArcPy but I am having an issue with installing it. I am running ArcGIS 10.3 and have the Python 27 folder which points to ArcGIS 10.3 folder which contains all of the DLLs and Libraries etc. for Python.

I have the PyScripter Setup program to install PyScripter version 2.5.3 for the 64-bit version of PyScripter. I am running Windows 7 on a 64-bit machine with Python 2.7 installed.

The problem is that as I go through the setup wizard for PyScripter that I get an error message after the final screen that says "Python could not be properly initialized. We must quit". The desktop icon is put in place but when I click on it I get the same message.

I did notice in the past if I install Python 3.3.2 on my machine that PyScripter will install properly. But the problem then becomes when I try to import ArcPy I get an error message stating that it cannot find ArcPy module. I might add that I do have the Desktop 10.3.pth file in the site-packages folder and that it is pointing to the  following paths:

C:\Program Files (x86)\ArcGIS\Desktop10.3\bin

C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy

C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcToolBox\Scripts

My goal is to get PyScripter to work with the current setup I have of ArcGIS 10.3 and Python 2.7. PyScripter looks to be a great IDE for Python and I would like very much to start using it. I've included some screen shots of my setup and the PyScripter installation wizard.

I would greatly appreciate any help or advice that I could get. Thanks.

John

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
DuncanHornby
MVP Notable Contributor

John,

I think you need to install the 32 bit version of pyscripter, that's what I have. So un-install the 64 bit version and install the 32 bit version. I'm running Windows 7 64bit but ArcMap is a 32bit application.

Then once that is up and running you need to go to menu option Tools > Options > IDE options  and then in the section called special packages add arcpy. Currently I have the following:

os, wx, scipy,arcpy,pythonaddins

Duncan

View solution in original post

10 Replies
DuncanHornby
MVP Notable Contributor

John,

I think you need to install the 32 bit version of pyscripter, that's what I have. So un-install the 64 bit version and install the 32 bit version. I'm running Windows 7 64bit but ArcMap is a 32bit application.

Then once that is up and running you need to go to menu option Tools > Options > IDE options  and then in the section called special packages add arcpy. Currently I have the following:

os, wx, scipy,arcpy,pythonaddins

Duncan

JohnWhite
New Contributor II

Duncan,

Thank You for the reply, I used your solution and it worked.

I just have one more question. I have noticed that the IntelliSense does not seem to work. For example I have the following code to create a Describe object:

streetDescObj = arcpy.Describe(r"C:\EsriPress\GISTPython\Data\OleanderOwnership.gdb\Elm_Fork_Addition")

#Get the properties of the feature class from the describe object

fcName = streetDescObj.baseName #name of feature class

print(fcName)

fcPath = streetDescObj.catalogPath #path to the file

print(fcPath)

#Is the feature type a point, line or polygon?

fcShape = streetDescObj.shapeType

print(fcShape)

When I start to key in the name of the Describe object (streetDescObj) and a period after defining it, I would expect to see a dropdown list of the different parameters but no list appears. Is there a setting that needs to be set in order to get this to happen? Thanks again.

John

0 Kudos
DuncanHornby
MVP Notable Contributor

I don't think it works like that. If you have typed arcpy then dot and can then see a drop down from which you can choose Describe then the intellisense is working. Beyond that it does not work as I guess describe can return many types of very different objects based upon the value you supply to it, so how is it supposed to know?

0 Kudos
TomGoeke
New Contributor III

I am trying to get PyScripter configured to work with ArcGis 10.3.  I have added arcpy to Tools > Options > IDE options as noted above.

Python version 2.6.0.0 x86

The PyScripter Pyton Path is

I still cannot get the auto complete to work correctly.  If I type arcpy.mapping.l the only options shown are "logging" and "logcall".  However if I type arcpy.mapping. a full list of options is displayed and I can scroll down to items such as "listdataframes".

Anyone else experience this or have a solution?

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

Try an upper-case "L" after mapping instead of lower-case.  The lookup or autocomplete is case sensitive.

TomGoeke
New Contributor III

That was it, thanks.

I have worked in numerous programming interfaces, this is the first one I have come across that is case sensitive for Auto-complete.  Guess this could be because Python is a case sensitive language.

0 Kudos
forestknutsen1
MVP Regular Contributor

This is a little off topic but, you might give PyCharm a try at some point. I switched from PyScripter about a year ago.

Python IDE &amp Django IDE for Web developers : JetBrains PyCharm

0 Kudos
MatthewRusso
New Contributor II

I had issues with PyScripter and switched to PyCharm, I like it way better.  Sorry for stealing your thread!

0 Kudos
JohnWhite
New Contributor II

No problem Matt. Helpful advice is not stealing a thread. I've heard some good things about PyCharm and from what little I've seen of it, I must say it looks like a good IDE. For now I like PyScripter but might make the switch in the near future. Thanks for the input.

0 Kudos