Python 3.8 compatibility

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
Schnilz
Posts: 5
Joined: Mon Jun 17, 2019 9:57 pm

Python 3.8 compatibility

Post by Schnilz »

Hey :)

i run freecad on archlinux with the AUR package "freecad-git (https://aur.archlinux.org/cgit/aur.git/ ... reecad-git)". In the last days the python update to python 3.8 was pushed to the archlinux repos. I recompiled freecad with the new python, but that didnt work straight away as Pyside2 wasnt found (-DPYSIDE_LIBRARY="/usr/lib/libpyside2.cpython-${PYVER//.}m-${CARCH}-linux-gnu.so" ), as that file doesnt exist anymore. /usr/lib/libpyside2.cpython-${PYVER//.}-${CARCH}-linux-gnu.so without the m does exist. After removing the m freecad compiles fine and also opens up the gui on startup but when i switch to the partbuilder workbench i get an error : TypeError: 'Shiboken.ObjectType' object is not iterable.

Im not realy sure if thats caused by removing the m (cause thats not actualy the needed library or something) or something else...
Any help is appreciated ;)

Full log is in the Attatchment
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Python 3.8 compatibility

Post by looo »

Pyside2 + python3.8 is not yet working. pyside2 version 5.14 will adress these issue. You can follow these links to get more information:
https://github.com/conda-forge/freecad- ... -551993747
https://bugreports.qt.io/browse/PYSIDE-939
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Python 3.8 compatibility

Post by vocx »

Schnilz wrote: Sun Nov 17, 2019 3:06 pm ...when i switch to the partbuilder workbench i get an error : TypeError: 'Shiboken.ObjectType' object is not iterable.
...
Please clarify which workbench you are talking about. There is a Part Workbench, and also a PartDesign Workbench.

Also, there is no log attached.
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.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Python 3.8 compatibility

Post by looo »

vocx wrote: Sun Nov 17, 2019 4:50 pm Please clarify which workbench you are talking about. There is a Part Workbench, and also a PartDesign Workbench.

Also, there is no log attached.
This is a general problem of current pyside2 versions because of wrong refcounting. I guess there is not much we can do.
Schnilz
Posts: 5
Joined: Mon Jun 17, 2019 9:57 pm

Re: Python 3.8 compatibility

Post by Schnilz »

thanks for the help!
i guess im using the appimage for now until pyside is working correctly with 3.8 :)
(its the partdesign workbench for reference, log added here, not sure what happend in the first post, sry)
Attachments
FreeCAD.log
(12.83 KiB) Downloaded 181 times
reox
Posts: 929
Joined: Sat Aug 13, 2016 10:06 am
Contact:

Re: Python 3.8 compatibility

Post by reox »

I also have issues on debian, but it looks like the transition phase between 3.7 and 3.8 in sid is not completely over yet.
Interestingly, I first got an error that /usr/bin/shiboken2 was missing. Hence, I installed the binaries as well. But then I got an error that pyside was build with python 3.7 and the minor version (3.8) is not supported.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Python 3.8 compatibility

Post by Kunda1 »

Dupe issue reported in https://forum.freecadweb.org/viewtopic.php?f=3&t=41119
The OP of that thread opened issue #4195
should we just go ahead a rename the bug to reflect the real issue (AKA py3.8/pyside2/shiboken2 compatibility issues) ?
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
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Python 3.8 compatibility

Post by Kunda1 »

Kunda1 wrote: Mon Nov 25, 2019 11:18 am Dupe issue reported in https://forum.freecadweb.org/viewtopic.php?f=3&t=41119
The OP of that thread opened issue #4195
should we just go ahead a rename the bug to reflect the real issue (AKA py3.8/pyside2/shiboken2 compatibility issues) ?
When this issue is solved please notate issue #4195 or close it.
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
Cyril
Posts: 133
Joined: Wed Aug 23, 2017 5:04 pm
Location: Geneva (Switzerland)
Contact:

Re: Python 3.8 compatibility

Post by Cyril »

Issue solved with Shiboken / PySide 5.14. Needed also to recompile pivy for python 3.8.
OS: Manjaro Linux (GNOME/gnome)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19 (Git)
Build type: Release
Branch: master
Hash: 6a4dd82415708c9b34ebb5883364e4060abc29dd
Python version: 3.8.0
Qt version: 5.14.0
Coin version: 4.0.0a
OCC version: 7.4.0
Locale: French/Switzerland (fr_CH)
I blog about HVAC / BIM / Energy : pythoncvc.net. If you like you can follow the RSS feed.
Post Reply