如何修复找不到默认Python错误(&C)
问题描述
我在Windows服务器(64位)上使用的是python,它是由另一个用户安装在C:useruserxAppDataLocalProgramsPythonPython36
中他自己的目录中的
C:Usersuser xAppDataLocalProgramsPythonPython36>test.py
launcher build: 32bit
launcher executable: Console
File 'C:Usersmy userAppDataLocalpy.ini' non-existent
File 'C:Windowspy.ini' non-existent
Called with command line: "C:Usersuser xAppDataLocalProgramsPythonPython
36 est.py"
maybe_handle_shebang: read 12 bytes
maybe_handle_shebang: BOM not found, using UTF-8
locating Pythons in 64bit registry
locate_pythons_for_key: unable to open PythonCore key in HKCU
locate_pythons_for_key: unable to open PythonCore key in HKLM
locating Pythons in native registry
locate_pythons_for_key: unable to open PythonCore key in HKCU
locate_pythons_for_key: unable to open PythonCore key in HKLM
found no configured value for 'python'
search for default Python found no interpreter
Can't find a default Python.
我尝试使用set pylaunch_debug=1
在命令行中运行代码,结果显示以下错误。
解决方案
我找到解决方案了:
在cmd中设置全局变量解决了此问题
C:>ftype Python="C:Usersuser xAppDataLocalProgramsPython36python.exe%1%*"
相关文章