Is it possible to add PyQt4/PySide packages on a Virtualenv sandbox?

后端 未结 13 1948
失恋的感觉
失恋的感觉 2020-11-28 20:16

I\'m using Virtualenv with profit on my development environment with web.py, simplejson and other web oriented packages.
I\'m going to develop

13条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-28 20:23

    For those who want to use PyQt4 in a Python 3 virtualenv (on OSX) you first install PyQt4 and SIP (I will use homebrew)

    $ brew install python3
    $ brew install sip --with-python3
    $ brew install pyqt --with-python3
    

    Then create your virtual environment

    $ virtualenv ...
    

    Finally symlink (change the versions of SIP, PyQt4 and Python for those installed on your machine)

    $ ln -s /usr/local/Cellar/sip/4.15.5/lib/python3.4/site-packages/*.* ~/{VIRTUALENVHOME}/{VIRTUALENVNAME}/lib/python3.4/site-packages/
    $ ln -s /usr/local/Cellar/pyqt/4.10.4/lib/python3.4/site-packages/PyQt4/*.* ~/{VIRTUALENVHOME}/{VIRTUALENVNAME}/lib/python3.4/site-packages/PyQt4
    

提交回复
热议问题