PyQt5 and virtualenv problem

Discussion in 'Python' started by D. Xenakis, Jul 28, 2013.

  1. D. Xenakis

    D. Xenakis Guest

    I tried to install SIP and PyQt5 using the pip install command but it didntwork on both cases (i was getting errors), so i finally installed them using the windows installers provided in riverbankcomputing website.
    My problem though here is that whenever i try to create a new virtualenv enviroment, those packages are not included and i cant import them. How can iadd PyQt5 to my new virt enviroment? What is the logic behind this problemso i understand whats going on here?

    Thx in advance
     
    D. Xenakis, Jul 28, 2013
    #1
    1. Advertising

  2. D. Xenakis

    D. Xenakis Guest

    1. Advertising

  3. D. Xenakis

    D. Xenakis Guest

    Could you help me install PyQt5 properly in my Virtualenv folder and not only globally?

    I tried installing PyQt5 and sip with the use of pip but i was getting errors all the time (Why is that? Are there any known pip issues along with PyQt5 and sip?), so in the end i had to install it with the installer providedfrom the official riverbank website.
    However now, everytime i create a virtual enviroment, PyQT5 or sip package is not included there and i dont know how to solve this problem either.

    I tried applying this fix: http://stackoverflow.com/questions/...pyqt4-pyside-packages-on-a-virtualenv-sandbox , but i do not know if i have done things right.
    I can import PyQt5 and pip packages from within python console without any errors being showed (both globaly and inside my virtuall enviroment), so i could assume i did all ok.
    But should this confirmation be enough for me or is there any other way i could confirm that everything is indeed properly installed?

    I noticed that in start menu - programs, a new folder named "PyQt GPL v5.0 for Python v3.3 (x64)" had been created after the installation, where someone can find view PyQt examples and a PyQT Examples module which starts an application.
    Big question now..

    Everytime i run PyQt Examples module from within global IDLE, everything works ok and then again when i close the application, this appears:
    Traceback (most recent call last):
    File "C:\Python33\Lib\site-packages\PyQt5\examples\qtdemo\qtdemo.pyw", line 91, in <module>
    sys.exit(app.exec_())
    SystemExit: 0

    However, everytime i run PyQt Examples module from within virtual env IDLE,nothing happends.

    So as you can undertand, this is why i believe i have not installed properly PyQt5 or sip
    **(I start virtual env IDLE using this shortcut ""..path..\Python\Python Projects\PriceTAG Grabber\env\Scripts\pythonw.exe" C:\Python33\Lib\idlelib\idle.pyw")

    I know i may have asked too many questions in just a single topic, but all im trying to achieve here is to be sure that PyQt5 and virtual env are working fine.

    Thx for your time in advance
     
    D. Xenakis, Jul 30, 2013
    #3
  4. D. Xenakis

    D. Xenakis Guest

    Any advice?Plz?
     
    D. Xenakis, Aug 2, 2013
    #4
  5. D. Xenakis

    Pete Forman Guest

    "D. Xenakis" <> writes:

    > I tried to install SIP and PyQt5 using the pip install command but it
    > didnt work on both cases (i was getting errors), so i finally
    > installed them using the windows installers provided in
    > riverbankcomputing website.
    > My problem though here is that whenever i try to create a new
    > virtualenv enviroment, those packages are not included and i cant
    > import them. How can i add PyQt5 to my new virt enviroment? What is
    > the logic behind this problem so i understand whats going on here?
    >
    > Thx in advance


    I can't comment on PyQt5 but I can say how to use PyQt4 with virtualenv
    on Windows.

    The Riverbank installers do not work in a virtualenv. However PySide
    wraps PyQt4 in a compatible installer. To use the installer it should be
    invoked with easy_install rather than pip install. Having installed it,
    pip uninstall works.

    https://pypi.python.org/pypi/PySide


    The Riverbank installer can install PyQt5 to your master copy of Python.
    You can then use the --system-site-packages flag when creating a
    virtualenv. The default behavior of virtualenv changed in 1.7
    (2011-11-30) from including system packages to excluding them.

    --
    Pete Forman
     
    Pete Forman, Aug 2, 2013
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Pascal Polleunus
    Replies:
    5
    Views:
    1,394
    Pascal Polleunus
    Oct 5, 2010
  2. Danny Shevitz

    virtualenv problem on win32

    Danny Shevitz, Apr 13, 2011, in forum: Python
    Replies:
    1
    Views:
    459
  3. Gelonida N
    Replies:
    4
    Views:
    1,015
    Gelonida N
    Aug 11, 2011
  4. Timmy O'Mahony
    Replies:
    2
    Views:
    293
    Timmy O'Mahony
    Sep 25, 2011
  5. Phil Thompson

    ANN: PyQt5 v5.1 Released

    Phil Thompson, Oct 3, 2013, in forum: Python
    Replies:
    0
    Views:
    205
    Phil Thompson
    Oct 3, 2013
Loading...

Share This Page