使用WSL Ubuntu 20.04在Pycharm中设置解释器

I added this descriptor to wsl.distributions.xml in the [pycharm]/config/options dir

 <descriptor>
        <id>Ubuntu-20.04</id>
        <microsoft-id>Ubuntu-20.04</microsoft-id>
        <executable-path>C:\Windows\System32\lxss\wslhost.exe</executable-path>
        <presentable-name>Ubuntu-20.04</presentable-name>
</descriptor>

When I go to set up the interpreter in pycharm, choose WSL and, it finds the correct version and /usr/bin/python points to the correct WSL package (the same package in the windows registory under lsxx)

但是,当我单击“确定”时,出现此错误:

Process finished with exit code 1

有什么想法吗?或如何使用日志进行调试?

error

评论