安装pywin32出现--Python version 3.x required, which was not found in the registry
这两天安装pywin32时出现了这个问题
双击.exe文件进入安装界面,然后点击下一步,它会自动定位你的python安装在什么地方,但是我的安装过程中未自动定位到python安装位置,并显示显示:
安装pywin32出现--Python version 3.6 required, which was not found in the registry
百度了好久,就执行个python脚本即可解决
1、新建一个register.py文件(我将其放在pywin32同一个文件下),双击打开
python3将以下代码粘贴并保存
from __future__ import print_function import sys try:
from winreg import *
except ImportError:
from _winreg import * # tweak as necessary
version = sys.version[:3]
installpath = sys.prefix regpath = "SOFTWARE\\Python\\Pythoncore\\{0}\\".format(version)
installkey = "InstallPath"
pythonkey = "PythonPath"
pythonpath = "{0};{1}\\Lib\\;{2}\\DLLs\\".format(
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()
2、保存之后进入cmd,切换到存储该py文件的目录,执行python registed.py即可重新运行exe文件进行pywin32的安装。
成功时的界面:然后点击下一步即可
安装pywin32出现--Python version 3.x 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 ...
- 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错误解决 解决: 建立一个文件 regis ...
- 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-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 ...
随机推荐
- Django 发布
0.完成好 Django 项目,做部署前准备,比如 settings.py 改 debug 什么的. 1.用 Gunicorn 部署 Django 项目,相当于部署 Java Web 的 Tomcat ...
- live555源代码分析
live555源代码下载(VC6工程):http://download.csdn.net/detail/leixiaohua1020/6374387 liveMedia 项目(http://www.l ...
- 【转】Pro Android学习笔记(十一):了解Intent(中)
Intent的构成 Intent可以带有action,data(由URI表达),extra data(key/value map,键值对),指定的类名(成为component name).一个inte ...
- java代码GUI简单的。。。
总结:觉得 package com.da; import java.awt.*; //逆向思维:important //创建一个String对象的数组,然后执行读取文本,把文本每一行存入数组,它将读取 ...
- AI-Info-Micron-Menu:About Micron
ylbtech-AI-Info-Micron-Menu:About Micron 将数据带入生活 美光科技的存储技术帮助将海量数据化为宝贵见解,重新定义世界使用信息的方式. 1.返回顶部 1. 公司简 ...
- 杂项:art-template-loader
ylbtech-杂项:art-template-loader 1.返回顶部 2.返回顶部 3.返回顶部 4.返回顶部 5.返回顶部 1. https://www.npmjs.com/p ...
- java web 基础 json 和 javaBean转化
github地址: https://github.com/liufeiSAP/JavaWebStudy 实体类: package com.study.demo.domain; import com.f ...
- 用paramiko写堡垒机
paramiko paramiko模块,基于SSH用于连接远程服务器并执行相关操作. 基本用法 SSHClient 基于用户名密码连接: 基础用法: import paramiko # 创建SSH对象 ...
- Jenkins配置邮件SMTP(使用QQ邮箱)
一.QQ邮箱中开启SMTP服务 进入QQ邮箱的设置页面,选择开启POP3/SMTP服务 需要发送一条短信开启服务,成功后,会收到一个密码,一定要截图.复制密码保存好 二.Jenkins中配置SMTP ...
- k8s 基础 pod操作
创建hell world pod #vim hello-world-pod.yaml apiVersion: v1 kind: Pod metadata: name: hello-world spec ...