V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
oldbird
V2EX  ›  Python

WSL 中如何启动 Python 编辑器的 GUI?

  •  
  •   oldbird · 2019-10-24 17:16:20 +08:00 · 3538 次点击
    这是一个创建于 1617 天前的主题,其中的信息可能已经有所发展或是发生改变。

    WIN10 的 WSL 装的 Ubuntu,安装了 anaconda3 和 thonny,想启动 thonny 作为 pythonIDE,提示 _tkinter.tclerror:no display name and no DISPLAY environment variable

    请教怎么解决?

    6 条回复    2019-10-25 10:45:05 +08:00
    Rheinmetal
        1
    Rheinmetal  
       2019-10-24 17:20:34 +08:00
    SilencerL
        2
    SilencerL  
       2019-10-24 17:21:10 +08:00
    这报错主要是因为 WSL 的确没有图形界面(吧)
    给 WSL 装个 X Server 试试(网上相关信息)
    ClericPy
        3
    ClericPy  
       2019-10-24 17:27:15 +08:00
    基本别指望了, 这就跟 Ubuntu server 上启动个非 headless 的 chrome 一样烦, 要开虚拟显示器, 然后让 GUI 程序投射到这个虚拟显示器里...
    silkriver
        4
    silkriver  
       2019-10-24 18:59:48 +08:00
    okou19900722
        5
    okou19900722  
       2019-10-25 09:16:26 +08:00
    aa6563679
        6
    aa6563679  
       2019-10-25 10:45:05 +08:00
    没那么麻烦。
    装一个 MobaXterm,自带 X Server,用 MobaXterm 里的 WSL 就能启动各种 GUI 软件
    MobaXterm 也能启动服务器上的 GUI 软件
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3263 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 14:07 · PVG 22:07 · LAX 07:07 · JFK 10:07
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.