我有CygWin与Python 2和3安装。当我运行py
我得到;
> py
launcher build: 32bit
launcher executable: Console
File 'C:\Users\user\AppData\Local\py.ini' non-existent
File 'C:\WINDOWS\py.ini' non-existent
Called with command line:
locating Pythons in 64bit registry
HKCU\SOFTWARE\Python\PythonCore\2.7\InstallPath: The system cannot find the file specified.
HKLM\SOFTWARE\Python\PythonCore\3.4\InstallPath: The system cannot find the file specified.
locating Pythons in native registry
HKCU\SOFTWARE\Python\PythonCore\2.7\InstallPath: The system cannot find the file specified.
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.
字符串
如果我创建了一个py.ini
,我会在里面放什么?PEP 397在这一点上有点模糊。
另外,Windows Python Launcher似乎无法正确响应py -h
或py --help
。是否有关于其命令行参数的描述?
我可以从Powershell提示符运行CygWin python
和python3
,所以路径似乎是正确的。
PS C:\Users\user> which python
/usr/bin/python
PS C:\Users\user> which python3.8
/usr/bin/python3.8
型
其他的想法?也许我可以安装一个CygWin py
,它可以取代Windows,并且行为正常?
1条答案
按热度按时间erhoui1w1#
在Win 10上创建“C:\Users\Doug\AppData\Local\py.ini”,例如
字符串
在当前目录下创建一个测试文件,例如“test_cygpy2”,
型
运行它,
型
我尝试使用-i选项。这很有效:
型