Using pip to install workbenches/addons

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
ZbynekWinkler
Posts: 10
Joined: Sat Sep 30, 2017 6:37 pm

Using pip to install workbenches/addons

Post by ZbynekWinkler »

Is anyone thinking about using pip and/or conda packages for freecad addons? The current solution with zip files works only for plain python addons. When binary package is needed, I guess we are out of luck. Also dependencies among addons would be handled properly as well as updates.

I run into this issue while trying to use cadquery workbench which tries to include cqparts extension to cadquery which depends on numpy to solve constraints for assemblies. Having UI which would just execute 'pip install cadquery-workbench' where the dependencies would be downloaded from pypi sounds great to me.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Using pip to install workbenches/addons

Post by triplus »

This ability was added to FreeCAD in the past:

https://github.com/FreeCAD/Workbench-Starterkit

Therefore you should be able to create a pip installable FreeCAD module when that is needed.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Using pip to install workbenches/addons

Post by looo »

Is anyone thinking about using pip and/or conda packages for freecad addons?
I am using pip and conda for two of my addons currently:
https://github.com/booya-at/freecad_glider
https://github.com/looooo/FCGear/tree/new_style_module

To use conda-packages for freecad, you will (most-likely) need to install FreeCAD compiled as a conda-package.
https://anaconda.org/freecad/freecad
https://github.com/FreeCAD/FreeCAD_Conda
ZbynekWinkler
Posts: 10
Joined: Sat Sep 30, 2017 6:37 pm

Re: Using pip to install workbenches/addons

Post by ZbynekWinkler »

looo wrote: Tue May 15, 2018 8:23 am
Is anyone thinking about using pip and/or conda packages for freecad addons?
I am using pip and conda for two of my addons currently:
https://github.com/booya-at/freecad_glider
https://github.com/looooo/FCGear/tree/new_style_module
Cool! I got the template workbench working already. I am trying to adjust cadquery workbench to this style, however I am currently stuck on some QT stuff that I don't understand (PySide vs PySide2). I guess I'll just keep disabling parts until it loads.
To use conda-packages for freecad, you will (most-likely) need to install FreeCAD compiled as a conda-package.
https://anaconda.org/freecad/freecad
https://github.com/FreeCAD/FreeCAD_Conda
I am already using it. Thanks for that work! I have also already submitted a PR https://github.com/FreeCAD/FreeCAD_Conda/pull/11 since 32bit miniconda defaults to 32bit environments and it is a pain to change it (if it can even be done reliably).
Post Reply