如何使用virtualenv安装wxPython
I am trying to begin a new python GUI application and I have decided to use wxPython as GUI because I want a multi-platform one.
我正在尝试开始一个新的python GUI应用程序,我决定使用wxPython作为GUI,因为我想要一个多平台的。
The problem is that I want to use virtualenv ( with virtualenvwrapper ) to isolate the environment and be able to reproduce it in other machines where I will work, but i cannot install wxPython.
问题是我想使用virtualenv(与virtualenvwrapper)隔离环境,并能够在我将工作的其他机器中重现它,但我无法安装wxPython。
I have it installed in my ubuntu machine via apt-get but that is not enough
我通过apt-get将它安装在我的ubuntu机器上,但这还不够
I have searched the web for a solution and i have found ...
我在网上搜索了一个解决方案,我发现......
This page http://batok.github.com/virtualenvwxp/ where it is explained a way to hack the virtualenv environment to use the local installation of wxPython. Not the best solution, but it would be a good workaround. The problem is that it is explained for Mac, and I couldnt make it work in my ubuntu.
这个页面http://batok.github.com/virtualenvwxp/解释了一种破解virtualenv环境以使用wxPython的本地安装的方法。不是最好的解决方案,但这将是一个很好的解决方法。问题是它是针对Mac解释的,我无法让它在我的ubuntu中运行。
Also found this page Installing wxPython in virtualenv under Linux where someone ask something similar. I have tried to build wxPython that way with no success.
还找到了这个页面在Linux下的virtualenv中安装wxPython,有人问类似的东西。我试图以这种方式构建wxPython但没有成功。
Any help would be appreciated.
任何帮助,将不胜感激。
In the end, I have choose wxPython beacuse it is multiplatform and i can use it without license problems, but as i have not started yet i can change my mind if there is another easier to install framework.
最后,我选择了wxPython,因为它是多平台的,我可以在没有许可证问题的情况下使用它,但由于我还没有开始,如果有另一个更容易安装的框架,我可以改变主意。
Thanks In advance
提前致谢
20110925: Sorry for the delay and thanks for the answers. I just have tried to install wxpython using buildout and the links given here, but i still have the same problem. It seems as if I need libgtk2.0-dev package to be able to compile wxpython...
20110925:对不起,感谢您的回答。我刚刚尝试使用buildout和这里给出的链接安装wxpython,但我仍然遇到同样的问题。好像我需要libgtk2.0-dev包才能编译wxpython ...
So there is any way to install this package locally to the buildout environment?
那么有什么方法可以将这个包本地安装到buildout环境中?
Thanks again.
3 个解决方案
#1
3
At the end I could not resolve this problem.
最后我无法解决这个问题。
I want to create a reproducible python environment with all the requirements inside using buildout and/or virtualenv so I could work in any linux system with just virtualenv, python and a C++ compiler installed.
我想创建一个可重现的python环境,其中包含使用buildout和/或virtualenv的所有需求,因此我可以在安装了virtualenv,python和C ++编译器的任何linux系统中工作。
It seems that the only way to do this is to use buildout cmmi recipes to download and build wxpython and ALL its dependencies. This is a really painful way, and I have no time now.
似乎这样做的唯一方法是使用buildout cmmi recipes来下载和构建wxpython及其所有依赖项。这是一种非常痛苦的方式,我现在没有时间。
I have decided to use a workaround: I am going to work on my ubuntu laptop most of the time, so I have installed wxpython from the repositories and use a wx.pth file to make it available to the virtual environment.
我决定使用一种解决方法:我大部分时间都在使用我的ubuntu笔记本电脑,所以我从存储库安装了wxpython并使用wx.pth文件使其可用于虚拟环境。
This is not a good solution, but seems the best till now ... so if someone knows any better solution please let me know.
这不是一个好的解决方案,但到目前为止似乎是最好的...所以,如果有人知道任何更好的解决方案,请告诉我。
When my python project is more mature, I will turn again to this problem and I will probably try the hard way ...
当我的python项目更加成熟时,我将再次讨论这个问题,我可能会努力尝试......
Thanks for all your answers and comments.
感谢您的所有答案和评论。
更多相关文章
- Ubuntu 安装XAMPP集成环境软件包 与 运行WordPress 的简单方法
- Linux部署测试环境总结
- Linux内核黑客的虚拟环境
- Linux 环境变量与文件查找
- linux下《UNIX环境高级编程》(apue2)源码编译出错的处理方法
- 使用Swoole加速Laravel(正式环境中)
- ubuntu 14.04 安装 minidwep-gtk, aircrack-ng, reaver 搭建抓包
- Linux安装maven及环境配置
- Media-S 简介(一个开源的DRM解决方案)