Hi, I usually have updated freecad on my system through an appimage, but I don't have it installed on my debian gnu linux system.
I would like to know if it is possible to import the freecad library in the python console of my system to test other applications that I am building without having to install freecad on my system.
Thanks
Is it possible to import the python freecad library from an appimage?
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
- dcapeletti
- Posts: 504
- Joined: Wed Jul 23, 2014 2:27 pm
Re: Is it possible to import the python freecad library from an appimage?
Before anyone else posts some hacks to do so: no the appimage is not designed for the usage within an other environment.
But the appimage currently is created with conda. So creating an environment with conda you should be able to install any additional library into the same env as freecad is installed (and also use freecad from python directly)
You can also create an appimage (locally) with additional libraries if you want to distribute a 3rd party module/workbench ... .
For further information please have a look at this script:
https://github.com/FreeCAD/FreeCAD-AppI ... _bundle.sh
If you create an environment with the highlighted command you will get all the libraries that are also installed in the appimage.
edit: update link
But the appimage currently is created with conda. So creating an environment with conda you should be able to install any additional library into the same env as freecad is installed (and also use freecad from python directly)
You can also create an appimage (locally) with additional libraries if you want to distribute a 3rd party module/workbench ... .
For further information please have a look at this script:
https://github.com/FreeCAD/FreeCAD-AppI ... _bundle.sh
If you create an environment with the highlighted command you will get all the libraries that are also installed in the appimage.
edit: update link
Last edited by looo on Tue Feb 09, 2021 9:56 am, edited 2 times in total.
Re: Is it possible to import the python freecad library from an appimage?
Hi looo, the link is broken. Is is replaced by https://github.com/FreeCAD/FreeCAD-AppI ... _bundle.sh ?looo wrote: ↑Sat Nov 30, 2019 1:55 pm For further information please have a look at this script:
https://github.com/FreeCAD/FreeCAD-AppI ... v.sh#L2L10
If you create an environment with the highlighted command you will get all the libraries that are also installed in the appimage.
Re: Is it possible to import the python freecad library from an appimage?
yes exactly. I have changed the link in the previous post.mnesarco wrote: ↑Mon Feb 08, 2021 2:04 amHi looo, the link is broken. Is is replaced by https://github.com/FreeCAD/FreeCAD-AppI ... _bundle.sh ?looo wrote: ↑Sat Nov 30, 2019 1:55 pm For further information please have a look at this script:
https://github.com/FreeCAD/FreeCAD-AppI ... v.sh#L2L10
If you create an environment with the highlighted command you will get all the libraries that are also installed in the appimage.
Re: Is it possible to import the python freecad library from an appimage?
Hi looo, what I need is something different. As a User, I prefer to use AppImages all the time. But it is normal that the AppImage does not contain some python packages. The problem is that I cannot just install the missing packages because the AppImage will not use any system installed package.
What I do and works sometimes is to download the desired package and add its folder to sys.path
Code: Select all
(sys.path.insert(0, path))
I wonder if is it possible to create a conda environment and add its root to sys.path, but I suspect that it will create a lot of conflicts.