Python version 3.6 required, which was not found in the registry错误解决
问题:
安装pywin32出现Python version 3.6 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\\" % (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 3.6 required, which was not found in the registry错误解决的更多相关文章
- 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 ...
- 96、python version 3.6 required,which was not fount in the registry(python3.6安装scrapy)
在安装scrapy时遇到问题 环境:win10(64位), Python3.6(64位) 安装scrapy: 1.安装wheel(安装后,便支持通过wheel文件安装软件) pip3 install ...
- python version 3.6 required,which was not fount in the registry(python3.6安装scrapy)
在安装scrapy时遇到问题 环境:win10(64位), Python3.6(64位) 安装scrapy: 1.安装wheel(安装后,便支持通过wheel文件安装软件) pip3 install ...
- 【转】安装第三方库出现 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 内容如下. 然 ...
- 安装第三方库出现 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 内容如下. 然 ...
- 【亲测】Python:解决方案:Python Version 2.7 required, which was not found in the registry
好久不更新随笔了,今天因为数据可视化作业,想抓取一些人人网好友关系数据,于是开始尝试python,用到numpy模块,安装的时候提示: 'Python Version 2.7 required, wh ...
- 安装pywin32出现--Python version 3.x required, which was not found in the registry
这两天安装pywin32时出现了这个问题 双击.exe文件进入安装界面,然后点击下一步,它会自动定位你的python安装在什么地方,但是我的安装过程中未自动定位到python安装位置,并显示显示: 安 ...
- 安装 pywin32-218.win32-py2.7.exe 报错python version 2.7 required,which was not found in the registry解决方案
随便在一个盘下 新建register.py的文件,内容如下: # # script to register Python 2.0 or later for use with win32all ...
- <转>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 regi ...
随机推荐
- [转]Web API OData V4 Keys, Composite Keys and Functions Part 11
本文转自:https://damienbod.com/2014/09/12/web-api-odata-v4-keys-composite-keys-and-functions-part-11/ We ...
- 【译】Steve Yegge的文章《Practicing Programming》
与你所相信的恰恰相反,单纯地每天埋头于工作并不能算是真正意义上的锻炼——参加会议并不能锻炼你的人际交往能力:回复邮件并不能提高你的打字水平.你必须定期留出时间,集中锻炼,这样才能把事情做得更好.我认识 ...
- 微信小程序(二)框架的基本组成
安装好 微信web开发者工具后. 让我们来了解一下工具的框架,上图: 工具总共分为三个部分,左上角红框框: 模拟器:模拟手机小程序界面,模拟器左上角可以选择手机型号,右上角红框处,千万别选成Offic ...
- 关于容器、虚拟机以及 Docker 的一个入门教程
Yves yao · 2017-09-05翻译 · 1315阅读 原文链接 huangxiaolu审校 源地址:http://zcfy.cc/article/a-beginner-friendly ...
- VC+++ 操作word
最近完成了一个使用VC++ 操作word生成扫描报告的功能,在这里将过程记录下来,开发环境为visual studio 2008 导入接口 首先在创建的MFC项目中引入word相关组件 右键点击 项目 ...
- P1025[SCOI2009]游戏
windy学会了一种游戏.对于1到N这N个数字,都有唯一且不同的1到N的数字与之对应.最开始windy把数字按 顺序1,2,3,……,N写一排在纸上.然后再在这一排下面写上它们对应的数字.然后又在新的 ...
- AIX 6.1记录
安装Oracle需要开启远程桌面进行访问 1. X Windows需要如下软件包才能正常运行 lslpp -l X11.apps.rte X11.apps.xterm X11.base.rte X11 ...
- .net core Web应用启动类
在ASP.NET Core中,Startup类为Web应用的入口类,用于配置Web服务的管道/过滤器以及Web应用所能用到的服务.在启动Web应用后,ASP.NET将在主库中查询名为Startup的类 ...
- js重名的处理
### 关于重名的处理 > 在变量提升阶段,如果名字重复了,不会重新的进行声明,但是会重新的进行定义(后面赋的值会把前面赋的值给替换掉) ```javascript //=>变量提升:fn ...
- 在centos6.x上安装teamviewer
首先下载公钥: # wget http://www.teamviewer.com/link/?url=354858 # rpm --import TeamViewer_Linux_PubKey.asc ...