Trouble Installating 3rd party python packages (Thermo and Fluids)

This subforum is specifically to discuss packaging issues on different platforms (windows, mac, linux), and using different packaging systems (conda, etc...)
Fillosov
Posts: 4
Joined: Wed May 25, 2022 2:23 pm

Trouble Installating 3rd party python packages (Thermo and Fluids)

Post by Fillosov »

Hi you all!

I'm new to the forum and to Freecad in general (I'm using it since January) and if I did something wrong with this post (wrong location or something similar) I'm sorry.

I'm currently using the Dodo workbench to work on some piping. In this workbench there is an utility that calculate the pressure loss along the pipes, but it requires the libraries Thermo and Fluid of Python.

I managed to install them on my system, but I don't know why Freecad is not able to recognize them. I tried solving these issue with the following tutorials:
The last one is using the Mnesarco tool in which I added these 2 lines, withouth success

Code: Select all

    C:\Users\user1\AppData\Local\Programs\Python\Python310\Lib\site-packages\fluids
    C:\Users\user1\AppData\Local\Programs\Python\Python310\Lib\site-packages\thermo
Basically, when I try to use the tool, I can't change nothing about the fluid that I'm using and I am stuck with the "custom fluid" preset that I can't modify.

Has anyone some clue in how to solve this?

Here my system and freecad info:

OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24267 +99 (Git)
Build type: Release
Branch: Branch_0.19.3
Hash: 6530e364184ce05ccff39501e175cf2237e6ee4b
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Last edited by Kunda1 on Wed May 25, 2022 3:47 pm, edited 1 time in total.
User avatar
Kunda1
Veteran
Posts: 12721
Joined: Thu Jan 05, 2017 9:03 pm

Re: Trouble Installating Thermo and Fluids Packages

Post by Kunda1 »

Looks like Dodo doesn't have a package.xml (metadata) enabled yet (https://github.com/oddtopus/dodo/pull/14) which potentially could be used to auto install python dependencies for the user. BTW, you should really be using v0.20dev (but actually, not sure if Dodo is optimized for v0.20dev since oddtopus has been inactive AFAICT)


Edit: renamed thread + fixed some bbcode formatting in OP
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
Fillosov
Posts: 4
Joined: Wed May 25, 2022 2:23 pm

Re: Trouble Installating 3rd party python packages (Thermo and Fluids)

Post by Fillosov »

First of all, thanks for your reply.
Do you suggest to try again with freecad 0.20?
I tried basically every thing I found online without success on 0.19, is there something else I can try?
User avatar
Kunda1
Veteran
Posts: 12721
Joined: Thu Jan 05, 2017 9:03 pm

Re: Trouble Installating 3rd party python packages (Thermo and Fluids)

Post by Kunda1 »

Well since v0.20dev and v0.19 can work in parallel, I would say yes, install v0.20dev https://github.com/FreeCAD/FreeCAD-Bund ... kly-builds. Backup v0.19 files before opening them in v0.20dev though (since the file won't be backward compatible in v0.19 after you've opened it in v0.20)

But make sure you also cross-check that you've exhausted all solutions provided on Extra_python_modules as well.

Edit: you'll probably need to reinstall or update the Dodo workbench via the AddonManager which was significantly updated in v0.20dev
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
Fillosov
Posts: 4
Joined: Wed May 25, 2022 2:23 pm

Re: Trouble Installating 3rd party python packages (Thermo and Fluids)

Post by Fillosov »

A little update!
I installed Freecad 0.20 and tried to follow again the instructions at https://forum.freecadweb.org/viewtopic.php?t=16851.
This time I managed to get all the libraries installed in the right directory and using mnesarco tool I saw that this path was already included in the core packages. I am sure that this time freecad has the package installed correctly, since I can type in the Python Console

Code: Select all

 import fluids
(or chemicals or thermo) and then I can type

Code: Select all

 fluids.
and it is showing me various commands.
But it doesn't seem to have affected the behaviour of the dodo workbench. I can still select only custom fluid from the fluid selector and I can't change anything in the fluid properties apart from density and viscosity.

Here you can see what I mean:

Image

I already tried to uninstall and install again the workbench and to restart the pc, without success.
Is this a bug of the Dodo Workbench or a problem with the packages? Or, is it an error on my part?

Thanks to everyone that will try to help me solve this.
User avatar
Kunda1
Veteran
Posts: 12721
Joined: Thu Jan 05, 2017 9:03 pm

Re: Trouble Installating 3rd party python packages (Thermo and Fluids)

Post by Kunda1 »

Thanks for reporting back.

It may be a bug in Dodo.
CC @oddtopus
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
waebbl
Posts: 165
Joined: Thu Aug 16, 2018 3:12 pm

Re: Trouble Installating 3rd party python packages (Thermo and Fluids)

Post by waebbl »

Fillosov wrote: Wed May 25, 2022 2:33 pm

Code: Select all

    C:\Users\user1\AppData\Local\Programs\Python\Python310\Lib\site-packages\fluids
    C:\Users\user1\AppData\Local\Programs\Python\Python310\Lib\site-packages\thermo
OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24267 +99 (Git)
Build type: Release
Branch: Branch_0.19.3
Hash: 6530e364184ce05ccff39501e175cf2237e6ee4b
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Could it be a mismatch with Python? You seem to have your fluids and thermo packages installed for Python 3.10, while your FreeCAD seems to be built for Python 3.8.
User avatar
Kunda1
Veteran
Posts: 12721
Joined: Thu Jan 05, 2017 9:03 pm

Re: Trouble Installating 3rd party python packages (Thermo and Fluids)

Post by Kunda1 »

waebbl wrote: Fri May 27, 2022 6:40 am Could it be a mismatch with Python? You seem to have your fluids and thermo packages installed for Python 3.10, while your FreeCAD seems to be built for Python 3.8.
Lol, i totally missed that. Thanks for pointing that out @waebbl :lol:
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
Fillosov
Posts: 4
Joined: Wed May 25, 2022 2:23 pm

Re: Trouble Installating 3rd party python packages (Thermo and Fluids)

Post by Fillosov »

Hi!
I'm now using FreeCad 0.20 and I installed the packages directly from the Python Console inside Freecad Using the instructions at https://forum.freecadweb.org/viewtopic.php?t=16851

As I said, now Freecad seems to reckognize the libraries as installed, as you can see here:
Image

But Dodo Pressure Loss tool is not working as I showed before.
Could it be that Dodo need a different version of the packages? If so, which ones?
Thanks again for the help, here my system info.

Code: Select all

OS: Windows 10 (10.0)
Word size of FreeCAD: 64-bit
Version: 0.20.28918 (Git)
Build type: Release
Branch: master
Hash: e1f2685734
Python 3.8.13, Qt 5.12.9, Coin 4.0.0, OCC 7.5.3
Locale: Italian/Italy (it_IT)
Installed mods: 
  * A2plus 0.4.56
  * Assembly4 0.11.12
  * BIM 2021.12.0
  * Curves 0.4.4
  * dodo
  * ExplodedAssembly
  * fasteners 0.3.41
  * lattice2 1.0.0
  * LCInterlocking
  * MnesarcoUtils 0.1.0
  * ose-piping
  * POV-Ray-Rendering
  * Rocket 2.4.1
  * sheetmetal 0.2.49
User avatar
Kunda1
Veteran
Posts: 12721
Joined: Thu Jan 05, 2017 9:03 pm

Re: Trouble Installating 3rd party python packages (Thermo and Fluids)

Post by Kunda1 »

I got @oddtopus to respond on the github repo but he isn't doing much Dodo related hacking these days. Perhaps he could weigh in anyway and provide a fix for this? If not someone will need to step-up and fix it
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
Post Reply