Python version 2.7 required, which was not found in the registry, pythonrequired

Source: Internet
Author: User

Python version 2.7 required, which was not found in the registry, pythonrequired

When installing the PIL library, you will be prompted: Python version 2.7 required, which was not found in the registry.

The general idea is that you cannot find the registry and search for a solution online.

Create a new register. py file and write the code:

Copy codeThe Code is as follows:
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 t 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 t:
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! "

Run the following command to switch to the register. py directory:

Reinstall PIL. The installation is successful.

If you select only the current user when installing the Python 32-bit program for Windows 7 64-bit users, the above problems will not occur. If you select all users, try the above solution.

The solution for other versions is similar.


When python version 27 required or which was not found in the registry occurs during software installation, how can this problem be solved? Diagram

You must first download and install python2.7,

Python installation Tool error no python installation found in the registry

Reinstall python.
The error message indicates that python is not found.
 

Related Article

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.