5

Can someone please let me know how I can set the PyScripter 2.5.3.0 x64 works with Python 2.7.3 which comes with ArcGIS what I did was:

  1. I installed the ArcGIS 10.2
  2. I installed PyScripter 2.5.3.0 x64 which forced my to install Python 3.3
  3. I installed Python 3

Now I can't use the PyScripter for ArcGIS Python. I already add the ArcPy in to PyScripter IDE Options--> Special package as: os, wx, SciPy, ArcPy but still not working.

I also check the "desktop10.2.pth" at c:\python27\ArcGIS10.2\Lib\site-packages which looks like:

C:\Program Files (x86)\ArcGIS\Desktop10.2\bin
C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy
C:\Program Files (x86)\ArcGIS\Desktop10.2\ArcToolbox\Scripts

Can you please let me know how I can fix this issue?

nmtoken
13.6k5 gold badges39 silver badges91 bronze badges
asked Dec 20, 2013 at 10:11
2
  • 3
    you had to use 32bit version even if you are running x64 machine Commented Dec 20, 2013 at 10:51
  • 3
    That is true, use code.google.com/p/pyscripter/downloads/…. Another thing is that you want to use Python 2.7 which is installed with ArcGIS instead of Python 3.3 which is not supported for now. Commented Dec 20, 2013 at 11:38

4 Answers 4

6

First make sure you have the 32 bit PyScripter installed, not the 64 bit. Then in Tools -> Python Path make sure you have PyScripter pointing to the following paths:

C:\Program Files (x86)\PyScripter\Lib\rpyc.zip
C:\Windows\system32\python27.zip
C:\Python27\ArcGIS10.2\DLLs
C:\Python27\ArcGIS10.2\lib
C:\Python27\ArcGIS10.2\lib\plat-win
C:\Python27\ArcGIS10.2\lib\lib-tk
C:\Python27\ArcGIS10.2
C:\Python27\ArcGIS10.2\lib\site-packages
C:\Program Files (x86)\ArcGIS\Desktop10.2\bin
C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy
C:\Program Files (x86)\ArcGIS\Desktop10.2\ArcToolbox\Scripts
C:\Python27\ArcGIS10.2\lib\site-packages\win32
C:\Python27\ArcGIS10.2\lib\site-packages\win32\lib
C:\Python27\ArcGIS10.2\lib\site-packages\Pythonwin
answered Dec 20, 2013 at 14:41
1
  • 1
    For me it didn't work: I pasted all those paths one by one in PyScripter but as soon as I apply the changes and go back to code, it can't find arcpy module. I go back to the Python Path and the changes I made before are simply not there. PyScripter is not keeping any of my additions. Any idea? Commented Jan 29, 2015 at 19:52
1

Perhaps, instead of "hardcoding" into the system's environment (as below, can't comment there...), you could use a batch file instead:

@echo off
set PYSC_DIR=%~dp0
set ARC_VER="ArcGIS10.2"
set ARC_DIR="E:\Esri\Desktop10.2\"
set PYTHONPATH="%PYSC_DIR%\Lib\rpyc.zip";C:\Windows\system32\python27.zip;C:\Python27\%ARC_VER%\DLLs;C:\Python27\%ARC_VER%\lib;
set PYTHONPATH=%PYTHONPATH%;C:\Python27\%ARC_VER%\lib\plat-win;C:\Python27\%ARC_VER%\lib\lib-tk;C:\Python27\%ARC_VER%;C:\Python27\%ARC_VER%\lib\site-packages;
set PYTHONPATH=%PYTHONPATH%;%ARC_DIR%\bin;%ARC_DIR%\arcpy;%ARC_DIR%\ArcToolbox\Scripts;
set PYTHONPATH=%PYTHONPATH%;C:\Python27\%ARC_VER%\lib\site-packages\win32;C:\Python27\%ARC_VER%\lib\site-packages\win32\lib;C:\Python27\%ARC_VER%\lib\site-packages\Pythonwin;
set PYTHONPATH=%PYTHONPATH:"=%
start "PyScripter" %PYSC_DIR%\PyScripter.exe --python27

I used this with success and i'll be able to change quickly for future versions of ArcGIS or use (my portable version of PyScripter) with different computers!

answered Feb 4, 2016 at 9:56
0

My solution is to have an installation of both PyScripter versions (x64, x86). When I am intended to use arcpy I run the x86 PyScripter with the paths as mentioned above. When I want to use another Python version (3.x) I utilize the x64 version.

Hope that the tip helps.

answered Sep 17, 2020 at 6:16
-1

FOR WINDOWS 7 Right click on My computer> Properties> Advanced System Settings> click on "Environment Variables" button> If there is not a PYTHONPATH variable> New> and name it "PYTHONPATH" and values are added with ";" to include as many items as you want.

C:\Program Files (x86)\PyScripter\Lib\rpyc.zip;C:\Windows\system32\python27.zip;C:\Python27\ArcGIS10.2\DLLs;C:\Python27\ArcGIS10.2\lib;C:\Python27\ArcGIS10.2\lib\plat-win;C:\Python27\ArcGIS10.2\lib\lib-tk;C:\Python27\ArcGIS10.2;C:\Python27\ArcGIS10.2\lib\site-packages;C:\Program Files (x86)\ArcGIS\Desktop10.2\bin;C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy;C:\Program Files (x86)\ArcGIS\Desktop10.2\ArcToolbox\Scripts;C:\Python27\ArcGIS10.2\lib\site-packages\win32;C:\Python27\ArcGIS10.2\lib\site-packages\win32\lib;C:\Python27\ArcGIS10.2\lib\site-packages\Pythonwin;

IMPORTANT don't forget to go to Tools> Options> IDE Option and then type "arcpy" into "Special packages".

papadoo
8095 silver badges12 bronze badges
answered Aug 12, 2015 at 16:49

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.