Discussion:
[PySide] PySide2 installed but not working
Spencer Parkin
2016-10-19 20:24:50 UTC
Permalink
Hi,

I built PySide2, 32-bit from sources, but when I run the tetrix.py example,
I get...

AttributeError: module 'PySide2.QtNetwork' has no attribute 'QSslSocket'.

If I comment out the call to QtNetwork.QSlSocket.suppertsSsl(), then get
another telling error...

AttributeError: module 'PySide2.QtGui' has no attribute 'QWidget'.

It sounds like to me that my installation is completely wacked-up. Qwidget
can't be found inside QtGui?! How is that even possible?

It's taken me over 4 hours to get to this point. I had to re-run the
install several times after making dependency fixes each time. Please
don't tell me I need to re-run the install.

Any help would be greatly appreciated. I'm ready to give up and just use
wxPython...It might be more reliable.

--Sp
Spencer Parkin
2016-10-19 21:23:39 UTC
Permalink
I gave up on PySide and switched to PyQt4. Works like a charm.

I was able to get wxPython working in 15 minutes too, BTW.

PySide1/2 needs some serious help. I'm not smart enough to get it
installed.
Post by Spencer Parkin
Hi,
I built PySide2, 32-bit from sources, but when I run the tetrix.py
example, I get...
AttributeError: module 'PySide2.QtNetwork' has no attribute 'QSslSocket'.
If I comment out the call to QtNetwork.QSlSocket.suppertsSsl(), then get
another telling error...
AttributeError: module 'PySide2.QtGui' has no attribute 'QWidget'.
It sounds like to me that my installation is completely wacked-up.
Qwidget can't be found inside QtGui?! How is that even possible?
It's taken me over 4 hours to get to this point. I had to re-run the
install several times after making dependency fixes each time. Please
don't tell me I need to re-run the install.
Any help would be greatly appreciated. I'm ready to give up and just use
wxPython...It might be more reliable.
--Sp
Alexey Vihorev
2016-10-19 21:34:56 UTC
Permalink
Wait a sec
 PyQt4 means you are fine with Qt4 and don’t need Qt5, right? Then you can use PySide1, it’s actually quite stable and no need to compile etc – just “pip install” it. PySide2 is work in progress for those who need Qt5 bindings. And BTW – Qt5 indeed restructured modules and classes. So maybe even PySide2 is actually working in your instance.



From: PySide [mailto:pyside-bounces+vihorev=***@qt-project.org] On Behalf Of Spencer Parkin
Sent: Thursday, October 20, 2016 12:24 AM
To: ***@qt-project.org
Subject: Re: [PySide] PySide2 installed but not working



I gave up on PySide and switched to PyQt4. Works like a charm.



I was able to get wxPython working in 15 minutes too, BTW.



PySide1/2 needs some serious help. I'm not smart enough to get it installed.



On Wed, Oct 19, 2016 at 2:24 PM, Spencer Parkin <***@gmail.com> wrote:

Hi,



I built PySide2, 32-bit from sources, but when I run the tetrix.py example, I get...



AttributeError: module 'PySide2.QtNetwork' has no attribute 'QSslSocket'.



If I comment out the call to QtNetwork.QSlSocket.suppertsSsl(), then get another telling error...



AttributeError: module 'PySide2.QtGui' has no attribute 'QWidget'.



It sounds like to me that my installation is completely wacked-up. Qwidget can't be found inside QtGui?! How is that even possible?



It's taken me over 4 hours to get to this point. I had to re-run the install several times after making dependency fixes each time. Please don't tell me I need to re-run the install.



Any help would be greatly appreciated. I'm ready to give up and just use wxPython...It might be more reliable.



--Sp
Spencer Parkin
2016-10-20 03:58:42 UTC
Permalink
I actually spent a full day trying to pip install pyside1 with no luck.
The pip install of pyside actually goes through a build process requiring
cmake and qmake as dependencies, and maybe openssl (I can't remember). You
need msvc compiler tools too, I think. cmake said it couldn't find
"QtCore" in a directory that, if you go and look, has QtCore4.lib, etc.,
inside of it, so cmake must be crazy. There were other errors that I can't
remember...Qt-specific cmake-macros that it complained weren't defined.
Maybe I'm crazy.

Then I spent a half day trying to get pyside2 to work. I finally got it
compiled and "installed", but then the examples didn't work. E.g., QWidget
couldn't be found inside of QtGui, which seems crazy. Not sure what went
wrong there.

One very difficult thing about building PySide2 is that the install (which
is essentially a build process) is not incremental! So if you (and I did
this) mistype a command line arg, such as "--openssl=blah/blah", you won't
know it until an hour later. So you fix it, then have to wait another hour
to see if the fixed worked.

Sorry, I don't mean to diss anything or anybody. I had a very difficult
time. I'm sure PyQt is awesome as is Qt once you finally have a working
installation of them. I'm a big fan of wx, personally, since I've used it
for so long and its architecture very straight-forward. I'm using Qt
because a coworker is and I'm helping him on the project.

For the sake of idiot users such as myself, an installer for PyQt would be
a good idea. (And by that I mean something that doesn't require
configuration and compilation and linking.)

Sorry, this went too long.
Post by Alexey Vihorev
Wait a sec
 PyQt4 means you are fine with Qt4 and don’t need Qt5, right?
Then you can use PySide1, it’s actually quite stable and no need to compile
etc – just “pip install” it. PySide2 is work in progress for those who need
Qt5 bindings. And BTW – Qt5 indeed restructured modules and classes. So
maybe even PySide2 is actually working in your instance.
Behalf Of *Spencer Parkin
*Sent:* Thursday, October 20, 2016 12:24 AM
*Subject:* Re: [PySide] PySide2 installed but not working
I gave up on PySide and switched to PyQt4. Works like a charm.
I was able to get wxPython working in 15 minutes too, BTW.
PySide1/2 needs some serious help. I'm not smart enough to get it installed.
Hi,
I built PySide2, 32-bit from sources, but when I run the tetrix.py example, I get...
AttributeError: module 'PySide2.QtNetwork' has no attribute 'QSslSocket'.
If I comment out the call to QtNetwork.QSlSocket.suppertsSsl(), then get
another telling error...
AttributeError: module 'PySide2.QtGui' has no attribute 'QWidget'.
It sounds like to me that my installation is completely wacked-up.
Qwidget can't be found inside QtGui?! How is that even possible?
It's taken me over 4 hours to get to this point. I had to re-run the
install several times after making dependency fixes each time. Please
don't tell me I need to re-run the install.
Any help would be greatly appreciated. I'm ready to give up and just use
wxPython...It might be more reliable.
--Sp
Spencer Parkin
2016-10-20 04:00:52 UTC
Permalink
Sorry, I meant an installer for PySide1/2.
Post by Spencer Parkin
I actually spent a full day trying to pip install pyside1 with no luck.
The pip install of pyside actually goes through a build process requiring
cmake and qmake as dependencies, and maybe openssl (I can't remember). You
need msvc compiler tools too, I think. cmake said it couldn't find
"QtCore" in a directory that, if you go and look, has QtCore4.lib, etc.,
inside of it, so cmake must be crazy. There were other errors that I can't
remember...Qt-specific cmake-macros that it complained weren't defined.
Maybe I'm crazy.
Then I spent a half day trying to get pyside2 to work. I finally got it
compiled and "installed", but then the examples didn't work. E.g., QWidget
couldn't be found inside of QtGui, which seems crazy. Not sure what went
wrong there.
One very difficult thing about building PySide2 is that the install (which
is essentially a build process) is not incremental! So if you (and I did
this) mistype a command line arg, such as "--openssl=blah/blah", you won't
know it until an hour later. So you fix it, then have to wait another hour
to see if the fixed worked.
Sorry, I don't mean to diss anything or anybody. I had a very difficult
time. I'm sure PyQt is awesome as is Qt once you finally have a working
installation of them. I'm a big fan of wx, personally, since I've used it
for so long and its architecture very straight-forward. I'm using Qt
because a coworker is and I'm helping him on the project.
For the sake of idiot users such as myself, an installer for PyQt would be
a good idea. (And by that I mean something that doesn't require
configuration and compilation and linking.)
Sorry, this went too long.
Post by Alexey Vihorev
Wait a sec
 PyQt4 means you are fine with Qt4 and don’t need Qt5, right?
Then you can use PySide1, it’s actually quite stable and no need to compile
etc – just “pip install” it. PySide2 is work in progress for those who need
Qt5 bindings. And BTW – Qt5 indeed restructured modules and classes. So
maybe even PySide2 is actually working in your instance.
Behalf Of *Spencer Parkin
*Sent:* Thursday, October 20, 2016 12:24 AM
*Subject:* Re: [PySide] PySide2 installed but not working
I gave up on PySide and switched to PyQt4. Works like a charm.
I was able to get wxPython working in 15 minutes too, BTW.
PySide1/2 needs some serious help. I'm not smart enough to get it installed.
Hi,
I built PySide2, 32-bit from sources, but when I run the tetrix.py example, I get...
AttributeError: module 'PySide2.QtNetwork' has no attribute 'QSslSocket'.
If I comment out the call to QtNetwork.QSlSocket.suppertsSsl(), then get
another telling error...
AttributeError: module 'PySide2.QtGui' has no attribute 'QWidget'.
It sounds like to me that my installation is completely wacked-up.
Qwidget can't be found inside QtGui?! How is that even possible?
It's taken me over 4 hours to get to this point. I had to re-run the
install several times after making dependency fixes each time. Please
don't tell me I need to re-run the install.
Any help would be greatly appreciated. I'm ready to give up and just use
wxPython...It might be more reliable.
--Sp
Alexey Vihorev
2016-10-20 07:19:41 UTC
Permalink
Couple of things to clear up. What is your OS? Do you need Qt5 or Qt4? What
version of Python do you use?
Post by Spencer Parkin
I actually spent a full day trying to pip install pyside1 with no luck.
The pip install of pyside actually goes through a build process requiring
cmake and qmake as dependencies, and maybe openssl (I can't remember). You
need msvc compiler tools too, I think. cmake said it couldn't find
"QtCore" in a directory that, if you go and look, has QtCore4.lib, etc.,
inside of it, so cmake must be crazy. There were other errors that I can't
remember...Qt-specific cmake-macros that it complained weren't defined.
Maybe I'm crazy.
Then I spent a half day trying to get pyside2 to work. I finally got it
compiled and "installed", but then the examples didn't work. E.g., QWidget
couldn't be found inside of QtGui, which seems crazy. Not sure what went
wrong there.
One very difficult thing about building PySide2 is that the install (which
is essentially a build process) is not incremental! So if you (and I did
this) mistype a command line arg, such as "--openssl=blah/blah", you won't
know it until an hour later. So you fix it, then have to wait another hour
to see if the fixed worked.
Sorry, I don't mean to diss anything or anybody. I had a very difficult
time. I'm sure PyQt is awesome as is Qt once you finally have a working
installation of them. I'm a big fan of wx, personally, since I've used it
for so long and its architecture very straight-forward. I'm using Qt
because a coworker is and I'm helping him on the project.
For the sake of idiot users such as myself, an installer for PyQt would be
a good idea. (And by that I mean something that doesn't require
configuration and compilation and linking.)
Sorry, this went too long.
Post by Alexey Vihorev
Wait a sec
 PyQt4 means you are fine with Qt4 and don’t need Qt5, right?
Then you can use PySide1, it’s actually quite stable and no need to compile
etc – just “pip install” it. PySide2 is work in progress for those who need
Qt5 bindings. And BTW – Qt5 indeed restructured modules and classes. So
maybe even PySide2 is actually working in your instance.
Behalf Of *Spencer Parkin
*Sent:* Thursday, October 20, 2016 12:24 AM
*Subject:* Re: [PySide] PySide2 installed but not working
I gave up on PySide and switched to PyQt4. Works like a charm.
I was able to get wxPython working in 15 minutes too, BTW.
PySide1/2 needs some serious help. I'm not smart enough to get it installed.
Hi,
I built PySide2, 32-bit from sources, but when I run the tetrix.py example, I get...
AttributeError: module 'PySide2.QtNetwork' has no attribute 'QSslSocket'.
If I comment out the call to QtNetwork.QSlSocket.suppertsSsl(), then get
another telling error...
AttributeError: module 'PySide2.QtGui' has no attribute 'QWidget'.
It sounds like to me that my installation is completely wacked-up.
Qwidget can't be found inside QtGui?! How is that even possible?
It's taken me over 4 hours to get to this point. I had to re-run the
install several times after making dependency fixes each time. Please
don't tell me I need to re-run the install.
Any help would be greatly appreciated. I'm ready to give up and just use
wxPython...It might be more reliable.
--Sp
--
Алексей ВОхПрев
Fredrik Averpil
2016-10-20 14:23:42 UTC
Permalink
Hi Spencer,

+1 on getting more info on your OS and Python version as well as whether
you need PySide or PySide2. Please keep in mind PySide2 hasn't really been
released yet and you're bound to face bleeding edge cases.

You're mentioning QSslSocket. When I build PySide2 I see this:
-- Checking for QSslSocket in QtNetwork -- not found

...which means PySide2 is built without QtNetwork.QSslSocket.
Do you see this as well?

I've assembled a modules list on some operating systems I'm building
PySide2 on, and there you can see which modules are successfully included
in the build and which modules are not found (for various reasons):
https://github.com/fredrikaverpil/pyside2-wheels
You can either download pre-built wheels (requiring Qt5 as a prerequisite)
or you can copy my build scripts.

If you're okay with using Python 3, I'd recommend you "pip3 install PyQt5",
as this is by far the simplest way of getting up and running with a Qt5
Python binding (requires no compilation).

Disclaimer: I'm in no way affiliated with The Qt Company or the PySide2
developers. I'm just a developer who uses PySide2 at work.

Regards,
Fredrik

Loading...