安装pywin时显示python version 2.7 required,which was not found in the registry

当安装pywin时遇到错误提示'python version 2.7 required,which was not found in the registry',问题在于Python 2.7的路径未正确注册在系统注册表中。解决方案包括手动添加注册表项或运行Python脚本register.py,通过命令行执行'python register.py'来完成注册。" 81111071,7850730,MapReduce计算模型实战解析,"['大数据开发', 'MapReduce', '数据处理']
摘要由CSDN通过智能技术生成

原因是安装Python时系统注册表没写一个PythonPath,具体路径如图:

这样再点开安装程序就能正常进行了,

如果嫌麻烦,可以写个.py文件:

#   
# script to register Python 2.0 or later for use with win32all   
# and other extensions that require Python registry settings   
#   
# written by Joakim Loew for Secret Labs AB / PythonWare   
#   
# source:   
# http://www.pythonware.com/products/works/articles/regpy20.htm   
#   
# modified by Valentine Gogichashvili as described in http://www.mail-archive.com/distutils-sig@python.org/msg10512.html   
   
import sys  
   
from _winreg import *  
   
# tweak as necessary   
version = sys.version[:3]  
installpath = sys.prefix  
   
regpath = "SOFTWARE\\Python\\Pythoncore\\%s\\" % (version)  
installkey = "InstallPath"  
pythonkey 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值