Python version 2.7 required, which was not found in the registry
安装setuptools的时候,不能再注册表中识别出来python2.7
在网上找了方法,仅作笔记,供下次使用
方法:
新建一个register.py 文件,把一下代码贴进去,保存(G盘)
# # 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.htmlimport sysfrom _winreg import *# tweak as necessary version = sys.version[:3] installpath = sys.prefixregpath = "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!"returnprint "--- Python", version, "is now registered!"returnif (QueryValue(reg, installkey) == installpath andQueryValue(reg, pythonkey) == pythonpath):CloseKey(reg)print "=== Python", version, "is already registered!"returnCloseKey(reg)print "*** Unable to register!"print "*** You probably have another Python installation!"if __name__ == "__main__":RegisterPy()
输入以下命令(register.py 存放在 G盘底下)
显示“python 2.7 is already registered”
再安装setuptools的时候,就能自动识别出来python2.7了。
win7是 64的原因,在安装python(32位)时,如果选择只为当前用户,以上问题是不会出现的,如果选择所有用户,那就用上面的方法解决吧。
代码来自:http://tech.valgog.com/2010/01/after-installing-64-bit-windows-7-at.html
Python version 2.7 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-32 required, which was not found in the registry 目录 解决问题 解决方法 解决 ...
- 成功解决安装pywin32时出现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 目录 解决问题 解决方法 第一步,打开 ...
- python修复不了_修复 Python version 2.6 required, which was not found in the registry.
如下: Portable Python是可移植的Python开发环境,它允许同一个系统环境下并存多个版本且相互独立的Python开发环境,也适合放在移动存储设备中作为一个完备的的.便携的开发环境,这两 ...
- 转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 ...
- python version 3.4 required_Python version 3.3 required, which was not found in the registry
在windows下安装numpy的时候, 出现了"Python version 3.3 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 r ...
- python version 2.7 required,which was not found
python version 2.7 required,which was not found.是因为两种原因,一种是没有配置python的环境变量,他真的不在注册表里面,另一种这是因为,python ...
- python version-32 required_python version 3.6 required,which was not fount in the regis-站长资讯中心...
在安装scrapy时遇到问题 环境:win10(64位), Python3.6(64位) 安装scrapy: 1.安装wheel(安装后,便支持通过wheel文件安装软件) pip3 install ...
- Unable to import required dependencies: numpy: The Python version is: Python3.8 from “D:\ancon\pytho
Unable to import required dependencies: numpy: The Python version is: Python3.8 from "D:\ancon\ ...
最新文章
- 机器人锤石下路组合_下周二,极智嘉研发总监讲解物流机器人视觉感知与定位关键技术...
- 为表增加字段与拷贝数据到另一个表
- three.js和php,threejs--初创项目
- react hooks使用_我如何使用React Hooks在约100行代码中构建异步表单验证库
- 十大经典排序算法最强总结(含JAVA代码实现),大厂 HR 如何面试
- 可以用AppleWatch解鎖iPhone
- 接口测试实战总结,绝对值得收藏
- Android ListView中EditView再次焦点获取
- 多线程有几种实现方法?同步有几种实现方法?
- linux下获取主机信息
- 关于智能手机的基本知识
- 数据结构(一)线性链表、非线性链表、稀疏数组与队列、单向链表
- 【301】怪诞行为学-可预测的非理性
- TOM邮箱|选出好用的邮箱让你事半功倍
- Visual C++网络编程经典案例详解 第9章 实用播放器 编程基础 播放mp3文件 读取文件
- 用 BERT 精简版 DistilBERT+TF.js,提升问答系统 2 倍性能
- 小鸟伏特加怎么用计算机,小鸟伏特加什么意思
- 编译小度deng wifi源码出错
- 单词 ---- part3
- 常见的web网络攻击处理方案
热门文章
- 使用 [funcref boost::pfr::get] 按索引访问结构体字段的测试程序
- boost::interprocess::message_queue用法的测试程序
- 基于Boost::beast模块的协程WebSocket 服务器
- ITK:复制非复合转换NonCompositeTransform
- DCMTK:命令行应用程序修改DICOM文件中的标签
- OpenCV Hit or Miss 击中或没打中的实例(附完整代码)
- Qt Creator粘贴和获取代码段
- OpenGL实现齿轮gears联动
- C++ Fermat‘s little theorem费马小定理寻找模逆实现算法(附完整源码)
- C++加号运算符重载