Python version 3.3 required, which was wasn't found in the registry

Source: Internet
Author: User
Tags python script

Python registry function syntax

When installing NumPy under Windows, there was a "Python version 3.3 required, which was wasn't found in the registry" error.

Similar: Python version 2.7 required, which is not found in the registry

The general meaning is: The registry does not have the corresponding information. Just execute a python script and register HKEY_CURRENT_USER (HKCU) as well.

Version 2.7 can be referenced by: http://blog.csdn.net/zklth/article/details/8117207

Version 3.3 can be referenced by: https://gist.github.com/embray/6042780#file-win_register_python-py

Related instructions:

http://pythonhosted.org/pyfits/appendix/faq.html# On-windows-vista-or-later-why-can-t-the-installer-find-python-in-the-registry

Where the Python3 version can execute the following script:

From __future__ import print_function import sys try:from winreg import *except importerror:from _winreg Import * # tweak as Necessaryversion = Sys.version[:3]installpath = Sys.prefix Regpath = "software\\python\\pythoncore\\{0}\\". Fo Rmat (version) Installkey = "InstallPath" Pythonkey = "PythonPath" PythonPath = "{0}; {1}\\lib\\; {2}\\dlls\\ ". Format (InstallPath, InstallPath, InstallPath) def registerpy (): Try:reg = Openkey (hkey_curren            T_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) Cl            Osekey (REG) Except:print ("* * * Unable to register!")        return print ("---Python", version, "is now registered!") return if (QueryValue (Reg, installkey) = = InstallPath and QueryValue (Reg, pythonkey) = = Pythonpath): Clos EKey (reg) Print ("= = = Python", version, "is already registered!")    Return Closekey (reg) Print ("* * * Unable to register!") Print ("* * * you probably has another Python installation!") if __name__ = = "__main__": Registerpy ()





Reprint please come from a handbook: http://yishouce.com/article/62.html

Python version 3.3 required, which was wasn't found in the registry

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.