2010-01-13

64 bit python installation issues on 64 bit Windows 7

After installing 64 bit Windows 7 at work, I got a problem of installing many python utilities that search for installed python locations is windows registry. distutils (setuptools-0.6c11.win32-py2.6.exe) still could not find 64 bit python installation, as well as develer's Unofficial MinGW GCC binaries for Windows (I still do not have a solution for that one :( ).

Actually, what helped me with disttools, was a http://www.mail-archive.com/distutils-sig@python.org/msg10512.html group thread. The currently available 64 bit python installation is registering python in a new location in windows registry. So one have to use a modified script for registering python the old way:

#
# script to register Python 2.0 or later for use with win32all
# and other extensions that require Python registry settings
#
# written by Joakim Loew for Secret Labs AB / PythonWare
#
# source:
# http://www.pythonware.com/products/works/articles/regpy20.htm
#
# modified by Valentine Gogichashvili as described in http://www.mail-archive.com/distutils-sig@python.org/msg10512.html

import sys

from _winreg import *

# tweak as necessary
version = sys.version[:3]
installpath = sys.prefix

regpath = "SOFTWARE\\Python\\Pythoncore\\%s\\" % (version)
installkey = "InstallPath"
pythonkey = "PythonPath"
pythonpath = "%s;%s\\Lib\\;%s\\DLLs\\" % (
    installpath, installpath, installpath
)

def RegisterPy():
    try:
        reg = OpenKey(HKEY_CURRENT_USER, regpath)
    except EnvironmentError as e:
        try:
            reg = CreateKey(HKEY_CURRENT_USER, regpath)
            SetValue(reg, installkey, REG_SZ, installpath)
            SetValue(reg, pythonkey, REG_SZ, pythonpath)
            CloseKey(reg)
        except:
            print "*** Unable to register!"
            return
        print "--- Python", version, "is now registered!"
        return
    if (QueryValue(reg, installkey) == installpath and
        QueryValue(reg, pythonkey) == pythonpath):
        CloseKey(reg)
        print "=== Python", version, "is already registered!"
        return
    CloseKey(reg)
    print "*** Unable to register!"
    print "*** You probably have another Python installation!"

if __name__ == "__main__":
    RegisterPy()

or just inject the following REG file into your registry if you are using python 2.6 installed in C:\Python26 directory

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Python]

[HKEY_CURRENT_USER\Software\Python\Pythoncore]

[HKEY_CURRENT_USER\Software\Python\Pythoncore\2.6]

[HKEY_CURRENT_USER\Software\Python\Pythoncore\2.6\InstallPath]
@="C:\\Python26"

[HKEY_CURRENT_USER\Software\Python\Pythoncore\2.6\PythonPath]
@="C:\\Python26;C:\\Python26\\Lib\\;C:\\Python26\\DLLs\\"

86 comments:

sfletche said...

was having some problems installing psycopg for postgres/postgis. used the registry contents that you posted above and it appears this saved me from having to reinstall python as 32-bit on my 64-bit windows 7 machine. thanks for the post!

Unknown said...

yep, thanks :)

Anonymous said...

It worked for me too (installing PIL). Thank you so much.

Unknown said...

Added those lines to a txt file then changed to a .reg file and merged to the registry and it worked for me too!

Unknown said...

The problem is the pywin32 is a 32 bit installer, it will look for the Python reg entries in the Wow6432Node, the following .reg file will add the entries, ensure the paths are correct for your install.

Tested with Windows 7 x64 and python 3.2.


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python]

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore]

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\3.2]

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\3.2\Help]

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\3.2\Help\Main Python Documentation]
@="C:\\Python32\\Doc\\python32.chm"

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\3.2\InstallPath]
@="C:\\Python32\\"

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\3.2\InstallPath\InstallGroup]
@="Python 3.2"

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\3.2\Modules]

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\3.2\PythonPath]
@="C:\\Python32\\Lib;C:\\Python32\\DLLs"

Dima Basavin said...

thanks a lot! it worked
(had a problem with pysqlite for python27)

maGo! said...

Thank you, worked like a charm, installed pywin32

Galal said...

Thanks a lot. =D

Jennifer said...
This comment has been removed by the author.
Jamie Faye Fenton said...

I used RegEdt32 and went into the HKEY_LOCAL_MACHINE hive, selected the python key, and used the export command to create a file I called pyreg.reg. This made a file similar to the one shown in the comment. I then replaced all references to HKEY_LOCAL_MACHINE with HKEY_CURRENT_USER (in NotePad), and saved the result as pyreg1.reg. I then executed on the cmd line:

regedt32 pyreg1.reg

(The effect of doing this is to capture the exact version of Python you have installed, including any changes to the registry layout it has).

Juan Pablo said...

Thank you! that worked for me!

Andrey Gannochka said...

Thank you very much! (Problem with Mabot installation has been fixed.)

Unknown said...

Used the .reg method, worked like a charm for Python27.

Thanks a lot!

Unknown said...

thx man i got so many solution , but just your are perfect
thx a lot

Anonymous said...

Thanks for this page on what to fill in for registry. It was strange though that 2.6 and 2.7 registered properly and 3.3 did not. I'm not sure if python is like Visual Studio where you have to have them in the proper order but I tried my best to do that.

Alex Irae said...

It workeeeed!

CTorres said...

you are an angel

chidambaram said...

Thank you may you live forever and continue the work forever.

Unknown said...

You saved my day!!

Anthony said...

Prevented me from having to do this manually; thus, very useful, and much appreciated.

Unknown said...

Thank you very much for the post. Helped a lot.

Alvin Paul said...

The solution is working on my PC. I also have windows 7 and suffers the same problem with it.

Alvin
www.ddlforall.blogspot.com

Unknown said...

Thank you, it worked for solving "unable register" problem when installing psycopg for postgres.

Unknown said...

It is Very Helpfull. I like it so much, Thanksss a lot.

free crack software | photo mechanic 5 serial

adysys said...

worked great. thanks alot

Unknown said...

I appreciate thsi posting..its very helpful. Thanks!!!
cracked software download | 4k stogram license key

Unknown said...

Helped alot..thanks for sharing!
pftrack download

Unknown said...

Amazing thanks for posting such a great tutorial its really very helpful for Php developer's in installing Python.Click here to download more Free Crack Software's == >
Latest Crack Software | Download Crack Software | Free Crack Software
Free Download Software | New Software Download

Unknown said...

Thanks for these informative website. Also visit this site :-)... 4K Stogram Crack

Unknown said...

Appreciation is a wonderful thing...thanks for sharing kepp it up.Photo Mechanic Crack
ImageRanger Pro Crack
Renee PassNow Crack
NCH Debut Video Capture Crack
Windows 7 All In One ISO
Window 7 Ultimate ISO Crack

cracklayer said...

Download Full Crack click the following;
https://cracklayer.com/falcon-box/
https://cracklayer.com/z3x-lg-tool/
https://cracklayer.com/norton-security/

Peck Marsh said...

Wonderful work! This is the kind of info that is meant to be shared across the internet. Disgrace on the search engines for not positioning this post higher! Come on over and consult with my website.
So, I would like to Share VideoSolo Screen Recorder Crack with you.
Windows 7 Ultimate ISO

Unknown said...

I really appreciate your initiative and your blog approach it helps many people like myself.

do visit my site for new and updated software : VovSoft VCF to TXT Converter

Arif Khichi said...

Thanks to share this content aiseesoft screen recorder crack

ryanmay1177 said...

Really Good Work Done By You...However, stopping by with great quality writing, it's hard to see any good blog today.
4K Stogram 3.4.3.3630 Crack

Software said...

Nice explanation and article. Continue to write articles like these, and visit my website at https://usacrack.info/ for more information.

StudioLine Web Designer 4.2.66 Crack

waresoftz123 said...

this amazing Software.
PCHelpSoft Driver Updater Crack
zoom player max Crack
Soni Typing Crack

Crack Software said...

Your style is so unique compared to other people I have read stuff from. Many thanks forposting when you have the opportunity, Guess I will just bookmark this site 4K Stogram

Nabiha art said...

This is amzaing blog thanks for that great information. Thanks!
adobe-dreamweaver-crack

combin-crack/

vray-crack

Crack Repack said...



You have done a great job on this article. It’s very readable and highly intelligent. You have even managed to make it understandable and easy to read.
crackrepack.com/

Softwarew said...

Nice explanation and article. Continue to write articles like these, and visit my website at https://usacrack.info/ for more information.
Enscape3D Sketchup Crack
Quillbot Premium Crack
EasyWorship Crack
EaseUS MobiSaver Crack
Teorex Inpaint 9.1 Crack

KANJU KING said...


So nice I am enjoying for that post as for u latest version of this Security tool Available
Lumion Pro Crack
Debut Video Capture Crack
iExplorer Crack
Nitro Pro Crack
PhpStorm Crack

Software Hub said...

Good work with the hard work you have done I appreciate your work thanks for sharing it...
Debut Video Capture Pro Crack

Unknown said...



I like your all post. You have done really good work. Thank you for the information you provide.
Geycrack.co
Cockos REAPER Crack
Teorex Inpaint Crack
Sandboxie Crack
All In One Toolbox Pro Crack

Softwarew said...


Nice explanation and article. Continue to write articles like these, and visit my website at https://usacrack.info/ for more information.
Avast Antivirus Crack
Avast Driver Updater Crack
4K Video Downloader Crack
Hotspot Shield Elite Crack
SparkoCam Crack
Luminar Crack
Rockstar 1.1.7.8 Crack
StudioLine Web Designer 4.2.66 Crack
Any Video Converter Ultimate 7.1.3 Crack

Softwarew said...


Nice explanation and article. Continue to write articles like these, and visit my website at https://usacrack.info/ for more information.
Teorex Inpaint 9.1 Crack
Enscape3D Sketchup Crack
Quillbot Premium Crack
EasyWorship Crack
EaseUS MobiSaver Crack

Harry Potter said...

Top 10 Sex Positions that you must Try with your partner
I really like your content.

iCracker.net said...

I read this article! I hope you will continue to have such articles to share with everyone! thank you! You can Visit my website
https://icracker.net/https://icracker.net/
iexplorer-crack
corel-draw-crack

Muzammil Boss said...

I guess I am the only one who came here to share my very own experience. Guess what!? I am using my laptop for almost the past 2 years, but I had no idea of solving some basic issues. I do not know how to Crack But Thankfully, I recently visited a website named Cracked Fine
Photo Mechanic Crack

Oceans Crack said...

Filmora Scrn Crack

GBWhatsApp Apk Crack

MAirList Home Studio Crack

AVS Video Editor Crack

Acronis True Image Crack


Thanks you for sharing. This is Very Usefull. These are brand new software!!! I'm very impress with you. Keep It Up!!!

Mr.Chips said...

Nice Post thanks. You can also visit my Blog:
FullCrackedPc
Ashampoo ZIP Pro Crack

RealCrack said...


I guess I am the only one who came here to share my very own experience. Guess what!? I am using my laptop for almost the past 2 years, but I had no idea of solving some basic issues. I do not know how to post But thankfully, I recently visited a website named Crack Softwares Free Download
Download Crack Softwares Free Download
Windows 11 Activator Crack
Nitro Pro Crack
Adobe Acrobat Pro DC Crack
Proteus Crack
Restoro Crack
NoteBurner Spotify Music Converter Crack
VueMinder Ultimate Crack

Mr.Chips said...

Nice Post thanks. You can also visit my Blog:
FullCrackedPc
Adobe Animate CC
Adobe Audition CC
Adobe Acrobat Pro DC
Actual Multiple Monitors

crackpc said...

I like your all post. You have done really good work. Thank you for the information you provide, it helped me a lot. prosvst.com I hope to have many more entries or so from you.
Very interesting blog.
Bandicut Crack

John cena said...



I'm really impressed with your writing skills, as smart as the structure of your weblog.
Is this a paid topic or do you change it yourself?
However, stopping by with great quality writing, it's hard to see any good blog today
crackkeywin.com
DRAWBOARD PDF Crack
TRANSMUTER STUDIO Crack
FREEMAKE VIDEO DOWNLOADER Crack
SHARP WORLD CLOCK Crack

RealCrack said...


I guess I am the only one who came here to share my very own experience. Guess what!? I am using my laptop for almost the past 2 years, but I had no idea of solving some basic issues. I do not know how to Download Latest PC Cracked Softwares But thankfully, I recently visited a website named pcsoftz.net
Adobe Photoshop Lightroom Crack
Icecream PDF Editor Pro crack
Tenorshare 4uKey For Android Crack
Restoro Crack
Restoro Crack
Autodesk PowerMill Crack
NoteBurner Spotify Music Converter Crack
Nitro Pro Crack

RealCrack said...

Philippe Ribiere -Rock Climber: Zivali Website >>>>> Download Now

>>>>> Download Full

Philippe Ribiere -Rock Climber: Zivali Website >>>>> Download LINK

>>>>> Download Now

Philippe Ribiere -Rock Climber: Zivali Website >>>>> Download Full

>>>>> Download LINK II

ijicrack said...

Acronis disk director Crack offers professional-grade partitioning tools, as well as a set of user-friendly controls, to make any operation quick and easy

ijicrack said...

Vectric Aspire Crack Free Download provides a powerful and intuitive software solution for creating and cutting spare parts with CNC routers.

ijicrack said...

Vectric Aspire Crack Free Download provides a powerful and intuitive software solution for creating and cutting spare parts with CNC routers.
Arturia Pigments VST Crack
USB Network Gate Crack
HitFilm Pro Crack
Posterino Crack
Clip Studio Paint EX Crack

Unknown said...

I like your all post. You have done really good work. Thank you for the information you provide, it helped me a lot. I hope to have many more entries or so from you.
Very interesting blog.
plugtorrent.com
O&O MediaRecovery Crack

Amine said...

Download Any in Udemy Paid Courses For Free

Google Adsense Marketing: Learn SEO tips and tricks in this SEO training courses

Free online marketing training to get the digital skills you need to grow your business

Forex course offers a series of free currency trading lessons that will teach you everything

Smith Michael said...

I am very impressed with your post because this post is very beneficial for me and provide a new knowledge to me
Adobe Lightroom Crack
Screenpresso Crack
Ludo Star MOD (Unlimited) Crack

hamza said...


Wow, amazing block structure! How long
Have you written a blog before? Working on a blog seems easy.
The overview of your website is pretty good, not to mention what it does.
In the content!
vstkey.com
PUSH Video Wallpaper Crack
FL Studio Crack
LD Player Crack
Enscape 3D Crack
IDM Crack
PhpStorm Crack
Redshift Render Crack

Unknown said...


Wow, amazing block structure! How long
Have you written a blog before? Working on a blog seems easy.
The overview of your website is pretty good, not to mention what it does.
In the content!
vstkey.com
Drip Fx VST Crack

Mughal Brother said...


I like your all post. You have done really good work. Thank you for the information you provide, it helped me a lot. I hope to have many more entries or so from you.
Very interesting blog.
vstdownloader.com
EaseUS Todo PCTrans Crack

praise said...

Shop Disney Parks App
MetaPikin
Facebook Dating App Download 2022

Amine said...

Best Buy 1 MONTHS IPTV SUBSCRIPTION

Best Buy 6 MONTHS IPTV SUBSCRIPTION

Best Buy 12 MONTHS IPTV SUBSCRIPTION

Taktek said...

Neroli
Neroli
Cybersécurité
agence webmarketing

eddielydon said...

It was not first article by this author as I always found him as a talented author. Super Bowl Dr. Dre Jacket

harryjohn said...

best media editor https://crackwinx.com/davinci-resolve-studio-crack/

Amine said...

Vavaview IPTV Vavaview IPTV over 19000 live channels,
more than 65000 movies and 9000 plus series which contains over 300000 episodes, all in stunning HD, UHD and 4K video ...https://vavaviewiptv.com/

Emerging India Group said...

Nice Post

Machine learning training institute

Amine said...

Lemo IPTV

SPEED CHECK said...

I recently ran a Telstra speed test on my home internet connection and was pleasantly surprised with the results. My download speeds were consistently above 80 Mbps and my upload speeds were hovering around 20 Mbps. This was a significant improvement from my previous internet provider, where I was often experiencing slowdowns and intermittent connection issues.

Amine said...

Kemo IPTV is one of the popular IPTV services and is the best alternative to traditional cable TV services. It allows you to stream videos at high-resolution quality. This IPTV offers live TV channels, movies, TV shows, sports, news, PPV, and many more. It is accessible on different devices such as Android, Firestick, iOS, and more. This IPTV offers fast and stable servers with Antifreeze technology.

fasehzafark said...

hy, nice blog .keep it up
Download latest version Matlab R2023a Crack

selfoops said...

download winrar license key

utilsworld said...

download latest version of filezilla crack

Amine said...


Pub TV

Hoorain Rehman said...

Windows 10 Full
Grand Theft Auto V
Chimera Tool Premium Crack
Waves Bundle Crack
SketchUp Pro Crack
Adobe Illustrator CC Latest

bloggingkorner said...

tamilrockers proxy
extratorrents

appslub.com
appzdl.com
fastpeoplesearch
/vmovee

John Albert said...

My time expanded web search has now been seen with reasonable tips to provide for my accomplices and partners. Winter Sale Jackets

Xorivom272 said...

In 2024, the tamilrockers proxy sites list and unblocked new link persist as a torrent website, serving as a proxy for users to download the latest movies, music, videos, and shows, including notable titles like "Salaar," "Dunki," and "12th Fail." Functioning as a gateway, it enables users to explore and acquire copyrighted content through magnet links and torrent files, fostering peer-to-peer file distribution.

Xorivom272 said...

In 2024, the tamilrockers proxy site sites list and unblocked new link persist as a torrent website, serving as a proxy for users to download the latest movies, music, videos, and shows, including notable titles like "Salaar," "Dunki," and "12th Fail." Functioning as a gateway, it enables users to explore and acquire copyrighted content through magnet links and torrent files, fostering peer-to-peer file distribution.

Adam Demos said...

Boosting Your Online Success, One Click at a Time.
VovSoft VCF to TXT Converter Crack