Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I figure that there must be a way for me to run python 2.6 and 2.7 on the same computer. I've got a program that requires 2.7, but ArcGIS requires 2.6. I'd like to be able to run both programs at the same time. I've installed both and in the geoprocessing settings set the default editor to C:\Python26\ArcGIS10.0\Lib\idlelib.idlepyw. Now when I right click in ArcToolbox, select edit, the IDLE 2.6 editor comes up but the script won't appear like it formerly did. I can view the script in IDLE 2.7 but that doesn't do me any good.

-Tom Dilts

share|improve this question
    
I recognize you as an ArcView old-timer, Tom. Welcome to our site! –  whuber Jan 15 '13 at 19:41
    
Is there a reason you can't upgrade to ArcGIS 10.1 which uses 2.7 natively? I.e., you have programs that run in 2.6 and they break in 2.7? –  Baltok Jan 15 '13 at 21:46
    
Thanks Bill. I'm excited to be on Stack Exchange. It seems like the community is MUCH better than the Esri forums (I have to say that Esri used to have a decent forum and they trashed that with their new setup). I also like the idea that it can be cross-platform cross-software but doesn't have to be. –  Tom Dilts Jan 16 '13 at 0:24
    
Baltok, We don't have 10.1 yet. Unfortunately that has to wait until next summer. –  Tom Dilts Jan 16 '13 at 0:25
    
@Baltok Here is a great stackoverflow question looking for good tutorials. Something for everyone I would wager. stackoverflow.com/questions/5844869/… –  Jay Laura Jan 16 '13 at 1:32
add comment

2 Answers

When you say 'same time' do you mean in the same process? If not, I would suggest using virtualenv. This is a python tool that allows you to have multiple installations of python with their own site-packages.

pip install virtualenv or easy_install virtualenv

Then when you create a virualenv to work in use the -p path/to/python/2.7. This tells the virtualenv which python to use. If you like this setup I would also check out virtualenvwrapper. It is a set of shell scripts (mainly) that manages your environments for you.


I wanted to update this answer with a new multi-version workflow that I have been enjoying. The folks over at continuum.io have released conda. So far, this is an even easier experience than using virtual environments or virtual environments with the virtualenv wrapper.

share|improve this answer
    
Jay Laura, I'm going to give virtualenv a shot. It sounds like the way to go. –  Tom Dilts Jan 16 '13 at 0:27
add comment

Have a look at this post: http://mapoholic.wordpress.com/2012/06/28/configure-pyscripter-qgis/ Just make sure you change the reg file to your settings

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.