是否可以在 Virtualenv 沙箱上添加 PyQt4/PySide 包? [英] Is it possible to add PyQt4/PySide packages on a Virtualenv sandbox?
问题描述
我正在使用 Virtualenv 并通过 web.py 在我的开发环境中获利
、simplejson
和其他面向 Web 的包.
我将使用 Qt 开发一个简单的 python 客户端,以重用一些使用 web.py 开发的 Api.
I'm using Virtualenv with profit on my development environment with web.py
, simplejson
and other web oriented packages.
I'm going to develop a simple python client using Qt to reuse some Api developed with web.py.
这里有人成功安装了带有 Virtualenv 的 PyQt4 吗?
可能吗?
Does anybody here had succesfully installed PyQt4 with Virtualenv?
Is it possible?
我已经下载了所有二进制文件,并且在我的 python2.6 目录中全局安装了 PyQt4
.
如果我不使用 --no-site--packages
选项,Virtualenv 会在我的新沙箱中正确包含 PyQt4
,但显然,我不使用所有全局包不需要.
I've downloaded all the binaries and have PyQt4
installed globally on my python2.6 directory.
If I don't use --no-site--packages
option, Virtualenv correctly includes PyQt4
in my new sandbox but, obviously, with all the global packages that I don't need.
是否有一种干净的方法来准备带有 --no-site--packages
选项的新沙箱,然后添加 PyQt4
或 PySide
使用 pip
、easy_install
或其他一些魔术?
Is there a clean way to prepare a new sandbox with --no-site--packages
option and then add PyQt4
or PySide
using pip
, easy_install
or some other magic trick?
推荐答案
创建一个空的 virtualenv 然后复制 .../site-packages/PyQt4
目录的内容应该就足够了进入它.
It should be enough to create an empty virtualenv and then copy the contents of the .../site-packages/PyQt4
directories into it.
我建议全局安装一次 PyQt4,复制目录,卸载它,然后使用这个技巧创建 VE.
I suggest to install PyQt4 once globally, make a copy of the directory, uninstall it and then use this trick to create VEs.
这篇关于是否可以在 Virtualenv 沙箱上添加 PyQt4/PySide 包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!