[Solved] PySide2.QtNetwork module missing

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
JiriVALASEK
Posts: 48
Joined: Wed Apr 17, 2019 7:42 pm

[Solved] PySide2.QtNetwork module missing

Post by JiriVALASEK »

Hi,

I have an issue loading my workbench into FreeCAD on Ubuntu 18.04. I am getting this error:

No module named 'PySide2.QtNetwork'
Traceback (most recent call last):
File "<string>", line 83, in Initialize
File "/usr/share/freecad/Mod/Animate/Server.py", line 38, in <module>
import communication as com
File "/usr/share/freecad/Mod/Animate/communication.py", line 41, in <module>
from PySide2.QtNetwork import QTcpServer, QTcpSocket, QAbstractSocket, \


I tried to add PySide2 using python -m pip install PySide2 but it lead into this issue https://forum.freecadweb.org/viewtopic. ... 30#p309808 rendering all workbenches useless.

Any idea how to add just PySide2.QtNetwork so that my workbench would work on Ubuntu? (On windows everything runs 0k)

Thanks
Last edited by JiriVALASEK on Wed Oct 02, 2019 6:27 am, edited 1 time in total.
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: PySide2.QtNetwork module missing

Post by vocx »

JiriVALASEK wrote: Tue Oct 01, 2019 8:42 pm Hi,

I have an issue loading my workbench into FreeCAD on Ubuntu 18.04. I am getting this error:
...
python -m pip install PySide2
...
And why do you do that?

Ubuntu has all this available in repositories. See Install on Unix; add the stable PPA.

Then you can install a bunch of Pyside modules.

Code: Select all

aptitude search python3-pyside

Code: Select all

i   python3-pyside2.qt3dcore                                     - Python bindings for Qt5 3DCore module (Python 3)                       
i   python3-pyside2.qt3dinput                                    - Python bindings for Qt5 3DInput module (Python 3)                      
i   python3-pyside2.qt3dlogic                                    - Python bindings for Qt5 3DLogic module (Python 3)                      
i   python3-pyside2.qt3drender                                   - Python bindings for Qt5 3DRender module (Python 3)                     
i   python3-pyside2.qtcharts                                     - Python bindings for Qt5 Charts module (Python 3)                       
i   python3-pyside2.qtconcurrent                                 - Python bindings for Qt5 Concurrent module (Python 3)                   
i   python3-pyside2.qtcore                                       - Python bindings for Qt5 core module (Python 3)                         
i   python3-pyside2.qtgui                                        - Python bindings for Qt5 Gui module (Python 3)                          
i   python3-pyside2.qthelp                                       - Python bindings for Qt5 Help module (Python 3)                         
i   python3-pyside2.qtlocation                                   - Python bindings for Qt5 Location module (Python 3)                     
i   python3-pyside2.qtmultimedia                                 - Python bindings for Qt5 Multimedia module (Python 3)                   
i   python3-pyside2.qtmultimediawidgets                          - Python bindings for Qt5 MultimediaWidgets module (Python 3)            
i   python3-pyside2.qtnetwork                                    - Python bindings for Qt5 Network module (Python 3)                      
i   python3-pyside2.qtopengl                                     - Python bindings for Qt5 OpenGL module (Python 3)                       
i   python3-pyside2.qtpositioning                                - Python bindings for Qt5 Positioning module (Python 3)                  
i   python3-pyside2.qtprintsupport                               - Python bindings for Qt5 PrintSupport module (Python 3)                 
i   python3-pyside2.qtqml                                        - Python bindings for Qt5 Qml module (Python 3)                          
i   python3-pyside2.qtquick                                      - Python bindings for Qt5 Quick module (Python 3)                        
i   python3-pyside2.qtquickwidgets                               - Python bindings for Qt5 QuickWidgets module (Python 3)                 
i   python3-pyside2.qtscript                                     - Python bindings for Qt5 Script module (Python 3)                       
i   python3-pyside2.qtscripttools                                - Python bindings for Qt5 ScriptTools module (Python 3)                  
i   python3-pyside2.qtsensors                                    - Python bindings for Qt5 Sensors module (Python 3)                      
i   python3-pyside2.qtsql                                        - Python bindings for Qt5 Sql module (Python 3)                          
i   python3-pyside2.qtsvg                                        - Python bindings for Qt5 Svg module (Python 3)                          
i   python3-pyside2.qttest                                       - Python bindings for Qt5 Test module (Python 3)                         
i   python3-pyside2.qttexttospeech                               - Python bindings for Qt5 TextToSpeech module (Python 3)                 
i   python3-pyside2.qtuitools                                    - Python bindings for Qt5 UiTools module (Python 3)                      
i   python3-pyside2.qtwebchannel                                 - Python bindings for Qt5 WebChannel module (Python 3)                   
i   python3-pyside2.qtwebenginecore                              - Python bindings for Qt5 WebEngineCore module (Python 3)                
i   python3-pyside2.qtwebenginewidgets                           - Python bindings for Qt5 WebEngineWidgets module (Python 3)             
i   python3-pyside2.qtwebsockets                                 - Python bindings for Qt5 WebSockets module (Python 3)                   
i   python3-pyside2.qtwidgets                                    - Python bindings for Qt5 Widgets module (Python 3)                      
i   python3-pyside2.qtx11extras                                  - Python bindings for Qt5 X11Extras module (Python 3)                    
i   python3-pyside2.qtxml                                        - Python bindings for Qt5 Xml module (Python 3)                          
i   python3-pyside2.qtxmlpatterns                                - Python bindings for Qt5 XmlPatterns module (Python 3)                  
Presumably what you want is this

Code: Select all

sudo apt install python3-pyside2.qtnetwork
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
JiriVALASEK
Posts: 48
Joined: Wed Apr 17, 2019 7:42 pm

Re: PySide2.QtNetwork module missing

Post by JiriVALASEK »

vocx wrote: Tue Oct 01, 2019 9:29 pm
JiriVALASEK wrote: Tue Oct 01, 2019 8:42 pm Hi,

I have an issue loading my workbench into FreeCAD on Ubuntu 18.04. I am getting this error:
...
python -m pip install PySide2
...
And why do you do that?
I thought that when some python module is missing/incomplete the best way would be to reinstall it through pip, I had no idea that you can install python modules using apt-get.
vocx wrote: Tue Oct 01, 2019 9:29 pm Presumably what you want is this

Code: Select all

sudo apt install python3-pyside2.qtnetwork
This is exactly what I needed. Thanks.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: PySide2.QtNetwork module missing

Post by Kunda1 »

OP, if and when your issue is fixed/answered, please mark the thread topic title [Solved]. Thanks!
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: PySide2.QtNetwork module missing

Post by vocx »

JiriVALASEK wrote: Wed Oct 02, 2019 5:07 am ...I had no idea that you can install python modules using apt-get.
That's the whole point of using Ubuntu. It has packages for popular software. What you cannot find in the repositories, that you install by other methods.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
JiriVALASEK
Posts: 48
Joined: Wed Apr 17, 2019 7:42 pm

Re: PySide2.QtNetwork module missing

Post by JiriVALASEK »

vocx wrote: Wed Oct 02, 2019 5:56 am That's the whole point of using Ubuntu. It has packages for popular software. What you cannot find in the repositories, that you install by other methods.
I know that. I just didn't imagine that it extended to python modules.
galou_breizh
Posts: 437
Joined: Wed Sep 15, 2010 9:38 am

Re: [Solved] PySide2.QtNetwork module missing

Post by galou_breizh »

The dependency to `python3-pyside2.qtnetwork` should be added to the FreeCAD package on Ubuntu. Who is actually responsible for it?

Thanks,
Gaël
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [Solved] PySide2.QtNetwork module missing

Post by Kunda1 »

kkremitzki wrote::bell:
@kkremitzki heads up
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply