PyQt5 and virtualenv problem


D

D. Xenakis

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
 
Ad

Advertisements

D

D. Xenakis

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
 
Ad

Advertisements

P

Pete Forman

D. Xenakis said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top