レジストリ内に見つかりませんでしたpywin32成功した解像度を、インストール時にPythonのバージョン3.6が必要
ディレクトリ
第3のステップは3.6 3.6または3.6から32にレジストリフォルダを変更することです!
第四の工程は、再実行することですpywin32-221.win-AMD64-py3.6.exe、再インストールpywin32
この問題を解決します
Pythonのバージョンで見つかりませんでしたpywin32、インストールする際に必要な3.6レジストリ
または
内に見つかりませんでしたPythonのバージョンpywin32をインストールする際に必要な3.6から32、レジストリを
ソリューション
最初のステップにregedit:登録エディタを開くために
第二段階のpythonを標的に示します、
注:いいえは、次のコマンドが自動的に登録されたエディタが生成されます実行する場合。
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()
再びレジストリエディタに、あなたが見ることができます
第3のステップは3.6 3.6または3.6から32にレジストリフォルダを変更することです!
プロンプト必要に応じて変更を行い、レジストリは、3.6または3.6のフォルダ3.6から32に変更されました
第四の工程は、再実行することですpywin32-221.win-AMD64-py3.6.exe、再インストールpywin32
私たちは完了です。
参考記事:https://blog.csdn.net/weixin_42762089/article/details/84781599