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
haython
V2EX  ›  Python

virtualenv 下使用 wxPython 就没成功过。。。

  •  
  •   haython · 2015-01-20 23:12:10 +08:00 · 3723 次点击
    这是一个创建于 3389 天前的主题,其中的信息可能已经有所发展或是发生改变。
    以前不用virtualenv的时候挺好弄的,现在用了,运行不了
    This program needs access to the screen.
    Please run with a Framework build of python, and only when you are
    logged in on the main display of your Mac.

    按照http://wiki.wxpython.org/wxPythonVirtualenvOnMac 这个弄过,不管用。。

    求大神
    第 1 条附言  ·  2015-01-21 00:25:55 +08:00
    mac系统,本身有一个python,用brew又安装了一个,virtualenv用的是新安装的那个,wxpython也是安装在这个python中的,如果我不切换到virtualenv里,直接用新安装的那个python执行wx的脚本是可以用的
    1 条回复    2015-01-20 23:25:02 +08:00
    sivacohan
        1
    sivacohan  
       2015-01-20 23:25:02 +08:00 via Android   ❤️ 1
    没玩过这个库。
    不过看你这个情况,在linux下应该
    export display=:1

    全凭记忆。和谐是给屏幕设定一个环境变量。不然程序找不到display
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2283 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 08:48 · PVG 16:48 · LAX 01:48 · JFK 04:48
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.