Python version 2.7 required, which was not found in the registry 报错处理

64位系统装32位的Python,Python version 3.5 required, which was not found,DLL load failed 64位系统装了32位的Python,安装exe格式对应python版本相关的包,报错:Python version 3.5 required, which was not found in the registry。      原因是注册表缺少Python安装信息,安装时,要注意选择。 64位系统32位Python,如果使用pywin32出现DLL load failed 复制文 阅读详情
windows安装MySQLdb是报错 "Python version 2.7 required, which was not found in the registry" 编写一下脚本内容如下运行


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()
Python version 2.7 required, which was not found in the registry 安装PIL库的时候,直接提示:Python version 2.7 required, which was not found in the registry。 如图: 大意是说找不到注册表,网上搜索解决方案。 新建一个register.py文件写入代码: 复制代码 代码如下: import sys    from _winreg import *    # tweak as necessary version = sys.version[:3] installpath = sys.prefix    regpath = “SOFTWARE\\Python\\Pythoncore\\%s\\ 立即下载

相关推荐

初识数据结构之入门必懂——线性表(顺序表)

本文将介绍数据结构中的线性表与线性表中最简单的结构——顺序表

m0_64705485的博客 905

安装Scons报no python installation found in the registry问题解决

解决安装Scons报no python installation found in the registry问题 真实实践可以使用的方法:我当前软件版本(scons-2.3.0-setup.exe、python-2.7.5.amd64.msi) 1、首先设置Python的环境变量--系统变量中去设置(我的电脑->属性->高级->环境变量->系统变量) PATH=PATH;c:\python27 代表可以用python.exe 运行*.py ...

1191

【Cubietruck】Qt5.8.0 x64、x86、armhf三个版本的编译安装

一、       Preparation 以下环境配置支持虚拟机和实体机,但是实体机生产效率会相对高一点,实体机编译Qt的速度是虚拟机两倍以上。 若使用虚拟机,推荐使用VirtualBox,开源免费,尽量不要使用Vmware破解版。   Download List   名称 链接 下载项目 OS https://mirro

beatfan的博客 3658

No Python installation found in the registry

问题描述: 在win10 中安装了python2.7 在该环境中安装pyserial2.7时出现了“No Python installation found in the registry...................." 解决方法: win8上,已经安装python27,...

874

国科大——形式语言与自动机理论(0812课程)——作业

此次作业题考察,包括但不限于有限自动机、无限自动机、正则文法、正则表达式以及正则语言的性质,题考查下推自动机相关的知识,题考查图灵机相关的知识。此课程建议本科学习过课程的同学选修,成绩占比:考试100%。此课程虽然留有作业,但可做也可不做,且不考勤。

qq_54145399的博客 706

09、Flutter FFI Dart Native API

本文介绍了 Dart Native API 的基本用法,解决了 Dart 与 C 异步通讯的问题

eieihihi的专栏 4397

安装第三方库出现 Python version 2.7 required, which was not found in the registry

安装第三方库出现 Python version 2.7 required, which was not found in the registry 建立一个文件 register.py 内容如下. 然后执行该脚本. import sys    from _winreg import *    # tweak as necessary version = sys.version

niuyisheng的专栏 1150

【Win10/11】Windows电脑WiFi显示小地球/断网的解决方法 Windows WiFi小地球、网络连接中断、网络重置、无线网卡驱动、Win10/Win11网络修复

最近经常有粉丝留言问我,Windows 电脑突然连不上 WiFi,右下角网络图标显示成了“小地球 🌐”,或者干脆提示“未连接 - 没有可用的连接”。明明其他设备网络都正常,唯独自己的电脑断了。作为在互联网大厂混迹多年的前端程序员,我自己也碰到过这个问题。总结几种比较常见、亲测有效的解决方法,写出来供大家参考,希望能帮你快速恢复上网!问题原因推荐解决方法系统设置错乱使用网络重置功能驱动异常或冲突卸载后重启自动安装驱动驱动版本过旧手动更新网卡驱动实在不行考虑使用系统还原点或重装系统这几个方法中,

代码简单说 Vue、JAVA、PHP、Node.js 熟练运用,接口、架构、性能全搞定。 3848

no python_No Python installation found in the registry

问题描述:在win10 中安装了python2.7在该环境中安装pyserial2.7时出现了“No Python installation found in the registry...................."解决方法:win8上,已经安装python27,但是在安装distorm的时候,却显示没有安装python27.然后,我通过直接修改注册表的方法,把这个问题解决掉了。1、wi...

weixin_39705850的博客 334

华为OD机试真题 新系统 2026-07-22 Java&Go&C 实现【最小代价完成论文评审】

某校有 n 篇论文需要分配给教师评审。 每篇论文 i 可由 files[i] 对应的教师列表中任一教师评审。 每篇论文至少需要一名教师评审。 每位教师 t 不论被分配多少篇论文,其评审费用固定为 cost[t]。 请给出参与评审教师数量最少时的总费用。 如果存在多种方案满足教师数量最少,则选择总费用最小的方案。

MISAYAONE的博客 148

【Unity】Gif图片播放插件(支持UI及模型纹理渲染两种模式)

unity本身不支持GIF格式文件直接渲染, 因此一般的做法是通过加载图片,通过代码控制其循环播放、停止等,模拟动画效果,本文简单介绍一下某个现有开源工具,感谢开源作者。

灵境引路人 4036

Pycharm显示Python版本2.7不具有模块“···“

首先是由于历史原因,Python有两个大的版本分支,Python2和Python3,又由于一些库只支持某个版本分支,所以需要在电脑上同时安装Python2和Python3。目前Python2的最新版本,也是最后一个版本是2.7.18,之后Python2便不再更新。起初我也很疑惑安装的明明是python3.10版本的解释器,却会出现2.7版本,于是在Google上查阅了一下资料。3.右下角有选项"检查与python版本的兼容性",去掉2.7的√,选择应用/确认即可。1.打开左上角文件,选择设置;...

qq_57155967的博客 4070

学Simulink——十二脉波整流电路(移相变压器)谐波抵消仿真

Y:Δ = 1:√3(若 DC 同压)— 此处同相电压故 220V(Y)=220V(Δ phase)Y(相电压=220V)、Δ(线电压=380V ⇒ 相=220V,30° 移相)可经 Lbal​=0.5mH(平衡电抗)或直接短(大 L_dc 下均流尚可)✅ 直流输出纹波频率 = 12·f_line(vs 6·f_line)直流输出 → Ldc​=50mH→Cdc​=2200µF→R=30Ω。Line‑Line RMS = 380 V(⇒ 相=220V)Vdc​≈1.35⋅380≈513V(同 6‑脉波)

xiaoheshang_123的博客 59

Python version 2.7 required, which was not found in the registry 的问题解决

最近模拟鼠标点击网页来爬取数据,碰到安装pyhook的第三方库。在安装pyHook-1.5.1.win32-py2.7.exe时报错了。 报错的内容为:Python version 2.7 required, which was not found in the registry 这时候需要注册一下python 2.7才能安装。 这里创建一个文件 register.py 然后执行该脚本.(...

楠木倾城 1379

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

python version 2.7 required_Python安装第三方库报错:Python version 2.7 required, which was not found in the r...

Python安装第三方库报错:Python version 2.7 required, which was not found in the registry.解决方法发布于 2014-12-06 17:01:23 | 1585 次阅读 | 评论: 1 | 来源: PHPERZPython编程语言Python 是一种面向对象、解释型计算机程序设计语言,由Guido van Rossum于1989年...

weixin_39622628的博客 670

迈瑞BS系列全自动生化分析仪LIS协议接口手册(内含HL7和ASTM)

迈瑞BS系列全自动生化分析仪LIS协议接口手册,内含HL7和ASTM)

Python 安装Twisted 提示python version 2.7 required,which was not found in the registry

由于我安装Python64位的,下载后没注册,安装Twisted时老提示“python version 2.7 required,which was not found in the registry”错误 解决方法 1、任意位置存放reg.py文件 # # script to register Python 2.0 or later for use with win3...

176

python2安装PIL等第三方库提示Python version 2.7 required, which was not found in the registry的解决方法

转载自http://www.phperz.com/article/14/1206/39686.html 错误描述: Python安装PIL等第三方库报错:Python version 2.7 required, which was not found in the registry. 解决方法: 是执行下面的脚本register.py: import sy

Snail_DM的博客 2290

Python安装第三方库报错:Python version 2.7 required, which was not found in the registry.

Python安装第三方库报错:Python version 2.7 required, which was not found in the registry. 解决方法是执行下面的脚本register.py: import sys from _winreg import * # tweak as necessary version = sys.version[:3] instal

乙酰水杨酸的专栏 1267

安装win32com报错-Python Version 2.7 required which was not found in the registry 问题解决 .

安装win32com时报找不到PYTHON,所以上百度查了一下,看到这篇文章: 今天在安装numpy时,出现了Python Version 2.7 required which was not found in the registry错误,解决方案如下。   Python的一些第三方库只到注册表的HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Pyt

olivesun88的博客 1425

成功解决 安装pywin32时出现python version 3.6-32 required, which was not found in the registry

安装pywin32时出现python version 3.6-32 required, which was not found in the registry 目录 解决问题 解决方法 解决问题 解决方法 参考文章:成功解决安装pywin32时出现python version 3.6 required, which was not foun...

头部AI社区如有邀博主AI主题演讲请私信—心比天高,仗剑走天涯,保持热爱,奔赴向梦想!低调,专注,谦虚,自律,反思,成长,还算比较正能量的博主,公益免费传播…内心特别想在AI界做出一些可以推进历史进程影响力的技术(兴趣使然,有点小情怀,也有点使命感呀 5743

安装 MySQLdb 出现 Python version 2.7 required, which was not found in the registry

最近在学习python,然后在学到python操作数据库的时候出了些问题:安装 MySQLdb 出现 Python version 2.7 required, which was not found in the registry ,查证了一下 原来是需要python注册一下才可以,建立一个文件 register.py 内容如下. 然后执行该脚本. import sys from _winr

Think_lion的博客 2218

windows安装python mysqldb时报错python version 2.7 required,which was not found in the registry

错误 python version 2.7 required,which was not found in the registry 安装PIL-1.1.7.win32-py2.7的时候,不能再注册表中识别出来python2.7  方法:新建一个register.py 文件,把一下代码贴进去,保存 # # script to register Python 2.0 or

just_for_your_smile的专栏 1160

安装cx_Oracle报错python version 3.4 required, which was not found in the registry

在安装https://pypi.python.org/pypi/cx_Oracle/5.2.1#downloads 下载了cx_Oracle,安装时提示python version 3.4 required, which was not found in the registry,按照字面的理解,一个是在注册表中没有找到python相关的信息,如果是机器上安装了多个版本的python,那意思就是没

cakecc2008的专栏 4096

python入门 python安装mysqldb Python version 2.7 required, which was not found in the registry

安装的时候报错Python version 2.7 required, which was not found in the registry 执行一下脚本 import sys from _winreg import * # tweak as necessary version = sys.version[:3] installpath = sys.prefix regpath = "SOFTWARE\\Python\\Pythoncore\\%s\\" % (version) insta..

tom有cat 275

scrapy报错python version 3.6-32 required,which was not found in the registry

scrapy报错python version 3.6-32 required,which was not found in the registry 转载: 在windows上安装pywin32-220.win-amd64-py3.6.exe,遇到如下错误: python version 3.6-32 required,which was not found in the registry ...

stay hungry ! stay foolish! 1124

win7+py2.7+pyHook的安装,并解决Python version 2.7 required,which was not found in the registry问题

win7+py2.7+pyHook的安装,并解决Python version 2.7 required,which was notfound in the registry问题 1.下载 .exe 文件,网址链接如下: http://nchc.dl.sourceforge.net/project/pyhook/pyhook/1.5.1/pyHook-1.5.1.win32-py2.7.exe

muli 1299
上一篇: Python CMD 中文乱码处理
下一篇: python在windows下连接mysql数据库
root_miss
博客等级 码龄10年 20粉丝 42原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值