FreeCAD 18.1/Ubuntu 18.04.2. LTS: no workbenches after install

Having trouble installing or compiling FreeCAD? Get help here.
User avatar
Hannu
Posts: 121
Joined: Fri Sep 11, 2015 4:12 pm
Location: Strängnäs, Sweden - 1hr drive west from Stockholm

Re: FreeCAD 18.1/Ubuntu 18.04.2. LTS: no workbenches after install

Postby Hannu » Thu May 23, 2019 6:53 pm

m.cavallerin wrote:
Wed May 22, 2019 5:16 pm
Hannu wrote:
Wed Apr 17, 2019 6:05 pm
kkremitzki wrote:
Wed May 22, 2019 2:34 am
m.cavallerin wrote:
Wed May 22, 2019 1:04 am

I clean almost everything and still it doesn't start
Can you be more explicit on what you've tried or what commands you've run?

Code: Select all

!!! DELETED !!!! 
"upd" is a script that does ...
sudo apt-get autoremove
sudo apt-get autoclean
... after having done "$ARGUMENTS"
These are the steps I followed
Please note that just a few lines BELOW these there WERE the ACTUAL commands I used.... I'll go back an remove/DEL this fake-info... (DONE!)
/Hannu - engineer & mild :geek:
- Embedded, Computer, Software, Electronic, Fault analysis. A&D Photography http://flickr.com/arkane
- Mechanics, FDM 3D-prints, Solder, Lathe, Mill, Weld -work. ISO Audits, Claim, Deviation, Corrective action
m.cavallerin
Posts: 103
Joined: Wed May 30, 2018 6:59 pm

Re: FreeCAD 18.1/Ubuntu 18.04.2. LTS: no workbenches after install

Postby m.cavallerin » Fri Aug 23, 2019 1:23 pm

Just a few steps forward.

I modified following libraries into my
.local/lib/python3.6/site-packages/PySide2/__init__.py
.local/lib/python3.6/site-packages/shiboken2/__init__.py
with the following editing on lines :

Code: Select all

#type.__signature__
type.__text_signature__
and it works but when I run the add-on manager, it complies:

Code: Select all

Running the Python command 'Std_AddonMgr' failed:
Traceback (most recent call last):
  File "/usr/share/freecad/Mod/AddonManager/AddonManagerGui.py", line 10, in Activated
    import AddonManager
  File "/usr/share/freecad/Mod/AddonManager/AddonManager.py", line 46, in <module>
    from PySide import QtCore, QtGui
  File "/usr/share/freecad/Ext/PySide/QtCore.py", line 1, in <module>
    from PySide2.QtCore import *

/usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.13' not found (required by /home/michele/.local/lib/python3.6/site-packages/PySide2/QtCore.abi3.so)
any help?

Enclosed the freeze for pip
Attachments
pipFreezeLog.log
(1.89 KiB) Downloaded 16 times
triplus
Posts: 9475
Joined: Mon Dec 12, 2011 4:45 pm

Re: FreeCAD 18.1/Ubuntu 18.04.2. LTS: no workbenches after install

Postby triplus » Sat Aug 24, 2019 11:11 pm

m.cavallerin wrote:
Fri Aug 23, 2019 1:23 pm
any help?
Based on the info you have provided i would say that at some point in the past you pip installed PySide2, using their official wheel. Now that packages are interfering with your FreeCAD install or AppImage. My recommendation would be to remove the pip installed PySide2 and try to run FreeCAD again.

P.S. If you have installed the PySide2 as --user you can quickly confirm if this is the culprit by creating another user account and try to run FreeCAD from that user account.
m.cavallerin
Posts: 103
Joined: Wed May 30, 2018 6:59 pm

Re: FreeCAD 18.1/Ubuntu 18.04.2. LTS: no workbenches after install

Postby m.cavallerin » Mon Aug 26, 2019 4:26 pm

Based on the info you have provided i would say that at some point in the past you pip installed PySide2, using their official wheel. Now that packages are interfering with your FreeCAD install or AppImage. My recommendation would be to remove the pip installed PySide2 and try to run FreeCAD again.
thank you very much!!!!!!
It worked..finally!!!!!

Regards!
triplus
Posts: 9475
Joined: Mon Dec 12, 2011 4:45 pm

Re: FreeCAD 18.1/Ubuntu 18.04.2. LTS: no workbenches after install

Postby triplus » Wed Aug 28, 2019 7:48 pm

m.cavallerin wrote:
Mon Aug 26, 2019 4:26 pm
thank you very much!!!!!!
It worked..finally!!!!!

Regards!
Good to hear that and you're welcome.
pa2ees
Posts: 1
Joined: Fri Dec 13, 2019 5:47 pm

Re: FreeCAD 18.1/Ubuntu 18.04.2. LTS: no workbenches after install

Postby pa2ees » Fri Dec 13, 2019 6:03 pm

removing pyside2 that was installed with pip install --user works, unless you would like to use pyside2 in other programs. I was able to work around the problem by modifying /usr/lib/freecad/Ext/freecad/__init__.py to contain the following:

Code: Select all

import pkgutil
import sys, os

__path__ = pkgutil.extend_path(__path__, __name__)

newpath = []
for val in sys.path:
    if not os.getenv("HOME") + '/.local' in val:
        newpath.append(val)
sys.path = newpath

import FreeCAD as app
This should remove all user site-packages from the path, so that freecad doesn't get borked using them.
mat
Posts: 4
Joined: Wed Jan 22, 2020 1:01 pm

Re: FreeCAD 18.1/Ubuntu 18.04.2. LTS: no workbenches after install

Postby mat » Tue May 19, 2020 11:15 am

Sorry to dig out an old thread but I have the exact same problem on freeCAD 18.4 (and ubuntu 18.04 LTS)

I confirmed the culprid was indeed an pyside2 incompatibility because when I uninstal it freeCAD works ; and when I install it I get the signature error as soon as I try to load a workbench.

As I need pyside2 for other things, I tried pa2ees' script modification (thx man). But it does not work for me, I still get the signature error.
Trying to execute the script in a python terminal I get :

>>> import pkgutil
>>> import sys, os
>>> __path__ = pkgutil.extend_path(__path__, __name__)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name '__path__' is not defined

I suppose it s not meant to be executed like that.

Anyone know what I could try?
vince_isg
Posts: 1
Joined: Fri Jun 05, 2020 2:32 pm

Re: FreeCAD 18.1/Ubuntu 18.04.2. LTS: no workbenches after install

Postby vince_isg » Fri Jun 05, 2020 2:44 pm

pa2ees wrote:
Fri Dec 13, 2019 6:03 pm
removing pyside2 that was installed with pip install --user works, unless you would like to use pyside2 in other programs. I was able to work around the problem by modifying /usr/lib/freecad/Ext/freecad/__init__.py to contain the following:

Code: Select all

import pkgutil
import sys, os

__path__ = pkgutil.extend_path(__path__, __name__)

newpath = []
for val in sys.path:
    if not os.getenv("HOME") + '/.local' in val:
        newpath.append(val)
sys.path = newpath

import FreeCAD as app
This should remove all user site-packages from the path, so that freecad doesn't get borked using them.
Thank you so much for this! PySide2 was creating problems with FreeCAD. No I removed it and everything is back. Unfortunately all my PySide2 projects won't work now.... changing the __init__.py as suggested didn't work. Any other idea how to keep Pyside2 alongside FreeCAD?
vocx
Posts: 5206
Joined: Thu Oct 18, 2018 9:18 pm

Re: FreeCAD 18.1/Ubuntu 18.04.2. LTS: no workbenches after install

Postby vocx » Fri Jun 05, 2020 11:59 pm

vince_isg wrote:
Fri Jun 05, 2020 2:44 pm
...Any other idea how to keep Pyside2 alongside FreeCAD?
I haven't read the thread in detail but PySide2 works without problem with FreeCAD. FreeCAD uses PySide2 in fact. It is one of its requisites for installation, at least if you install in normal ways.

Code: Select all

Package: freecad-daily-python3    
Version: 0.19~pre2~202006050120~ubuntu18.04.1
State: installed (0.19~pre2~202006040256~ubuntu18.04.1), upgrade available (0.19~pre2~202006050120~ubuntu18.04.1)
Automatically installed: yes
Priority: optional
Section: science
Maintainer: Debian Science Maintainers <debian-science-maintainers@lists.alioth.debian.org>
Architecture: amd64
Uncompressed Size: 102 k
Depends: freecad-daily-common, python3-matplotlib, python3-pivy, python3-pyside2.qtcore, python3-pyside2.qtgui, python3-pyside2.qtuitools,
         python3-pyside2.qtsvg, python3-pyside2.qtwidgets, python3-pyside2.qtxml, python3-pyside2uic, libfreecad-daily-python3-0.19 (<
         0.19~pre2~202006050120~ubuntu18.04.1+1~), libfreecad-daily-python3-0.19 (>= 0.19~pre2~202006050120~ubuntu18.04.1), libc6 (>= 2.14),
         libgcc1 (>= 1:3.0), libpython3.6 (>= 3.6.5), libqt5core5a (>= 5.9.0~beta), libqt5gui5 (>= 5.7.0), libqt5widgets5 (>= 5.0.2),
         libstdc++6 (>= 5.2)
There are two versions of FreeCAD, one compiled against Python 2 and Qt4 (PySide), and one compiled for Python 3 and Qt5 (PySide2), you should be using the latter one, as Python 2 and Qt4 are both obsolete. Notice that if you install the Qt5 version, a special PySide module is installed in the installation directory of FreeCAD that points to PySide2. This is a trick so your scripts works with both Qt4 (PySide) and Qt5 (PySide2).

However, depending on your particular system, you may have conflicting versions of Qt5. This message in one of the posts above leads me to believe this is the case.

Code: Select all

/usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.13' not found (required by /home/michele/.local/lib/python3.6/site-packages/PySide2/QtCore.abi3.so)
If you are using Ubuntu, simply install FreeCAD from the PPA; it's the simplest way (Install on Linux). Or use the AppImage so that it doesn't cause conflict with the rest of your system. There is also an experimental Ubuntu Snap.
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.
triplus
Posts: 9475
Joined: Mon Dec 12, 2011 4:45 pm

Re: FreeCAD 18.1/Ubuntu 18.04.2. LTS: no workbenches after install

Postby triplus » Mon Jun 08, 2020 5:53 pm

Didn't test it, but i guess one way would be to install PySide2 like this:

Code: Select all

pip3 install PySide2 --user --target path_to_custom_directory
As PySide2 won't be installed to any of the standard Python module search paths, FreeCAD won't find it and hence will not try to use it. In other projects you will need to make sure PIP installed PySide2 will be found, by using PYTHONPATH environment variable or by modifying sys.path.

P.S. Obligatory XKCD:

Image