在Linux下的virtualenv中安装wxPython [英] Installing wxPython in virtualenv under Linux
问题描述
我正在尝试在virtualenv中设置一个wxpython. 正如在许多地方所详细介绍的那样,由于setup.py不存在easy_install/pip安装剂量器.
I am trying to set up a wxpython inside virtualenv. As detailed in many places, the easy_install / pip install dosent work as setup.py is not present.
我介绍了如何在Mac上进行设置的说明,但没有找到用于Linux的此类方法.
I cam across a description on how to set it up on a Mac, but found no such methods for Linux.
如何在Linux上完成此操作?
How can this be done on Linux ?
我的实际用例是一个实验性的.我正在尝试让django项目调用wxpython应用程序.这在virtualenv外部有效,但是导入失败,因为在virtualenv中未安装wx.
My actual use case is a little experimental. I am trying to get a django project call a wxpython app. This works outside of virtualenv, but the import fails as wx is not installed in virtualenv.
非常感谢您的帮助.
推荐答案
在Ubuntu 12.04上,以下内容对我有用:
On Ubuntu 12.04 the following worked for me:
cd <env>/lib/python-2.7/site-packages
ln -s /usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/ .
ln -s /usr/lib/python2.7/dist-packages/wx.pth .
ln -s /usr/lib/python2.7/dist-packages/wxversion.py .
ln -s /usr/lib/python2.7/dist-packages/wxversion.pyc .
这篇关于在Linux下的virtualenv中安装wxPython的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!