Let's talk about Conda

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Let's talk about Conda

Post by looo »

vocx wrote: Sun Nov 10, 2019 12:57 am
looo wrote: Sat Nov 09, 2019 11:34 pm ...And letting this up to the user is also a no no, because code dependent on FreeCAD should run without getting into contact with such details...
I disagree with this. The users should always be accountable for what goes in their system. We cannot treat the users like babies, and hand hold them entirely. I think if the documentation is good enough, a competent user should be able to figure things out when it comes to dependencies, paths, and things of that nature. With that said, if this Conda thing really improves things as you say, fine, I'm not opposed to that; I just think the user should have some semblance of competence to start.
You must misunderstand something. This is about the python interface and not about treating users as babies. There are rules for providing cross-platform python interfaces and not aligning to these rules will introduce incompatibilities. If we cannot align to these rules because we have multiple versions of the same freecad library in one of the supported systems, we have to think about if this issue is dependent on the way how things are distributed on this system.

Please take your time and think about distributing a python-module for different systems/distros which depends on FreeCAD (import FreeCAD). Simple try this for Ubuntu (I suppose you have access to Ubuntu) and you will recognize, that you have to select a freecad version and modify the sys.path before you can "import FreeCAD".
Now think about other users with different platforms and you will recognize that there are other system dependent modifications necessary to make your module useable on these system.
And once you done this all, ask yourself what the reason for all this was.
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Let's talk about Conda

Post by vocx »

looo wrote: Sun Nov 10, 2019 7:23 am ...
And once you done this all, ask yourself what the reason for all this was.
I think you are thinking way too much about this "FreeCAD as a library" aspect. I think most people think about it as "FreeCAD as a program". I understand that it can be used as a library, but honestly I don't see many issues with that. In the other thread about the Startkit you mention the same, as if it's a very big problem that needs to be solved. I just don't see it that way, at least not at the moment.
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: Let's talk about Conda

Post by looo »

vocx wrote: Mon Nov 11, 2019 5:44 am I think you are thinking way too much about this "FreeCAD as a library" aspect. I think most people think about it as "FreeCAD as a program". I understand that it can be used as a library, but honestly I don't see many issues with that. In the other thread about the Startkit you mention the same, as if it's a very big problem that needs to be solved. I just don't see it that way, at least not at the moment.
Absolutely right, everyone has different expectations.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Let's talk about Conda

Post by triplus »

Well, one big benefit of Conda is it's cross platform. Another one is currently FreeCAD and its dependencies are well maintained. That comes down to having latest versions of most dependencies made available. In addition, currently people don't have to install Conda, for being able to run FreeCAD, as binaries are made available, from the Conda packages, for all supported platform. If you are more developer oriented, using Conda directly is considered to be a breeze.

P.S. And no, most people don't compile software. Basically if a binary doesn't exist, software doesn't exist, for most people out there.
Bayesian
Posts: 90
Joined: Thu Aug 08, 2019 1:49 pm

Re: Let's talk about Conda

Post by Bayesian »

I currently have a strange issue with the conda repositories.

With an older conda install on a Ubuntu system, I can run the following command just fine:

Code: Select all

> conda create --name fcenv-dev --channel freecad/label/dev freecad
In a fresh Ubuntu VM, with a fresh miniconda3 64 bit setup, the following happens:

Code: Select all

Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: | 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                          

UnsatisfiableError: 
And yes, there is no output after the last line.
Bayesian
Posts: 90
Joined: Thu Aug 08, 2019 1:49 pm

Re: Let's talk about Conda

Post by Bayesian »

The reason, as far as I understand it, seems to be that the latest build uploaded to freecad/label/dev requires a numpy version whose package in the standard repository doesn't support python 3.8 right now or anymore. But there is a package in conda-forge for 3.8.

So you "just" need to add both conda-forge and freecad/label/dev channels. And then make sure you install the dev build of freecad...
MRx
Posts: 319
Joined: Wed Jul 08, 2020 5:59 am
Location: Tainan / Taiwan

Re: Let's talk about Conda

Post by MRx »

After trying to build freecad on MacOS with conda ... my statement about it:

it should be removed and go back to use normal configure scripts and/or Makefiles only.
Conda adds more issues ontop of FreeCAD if someone wants to fix FreeCAD issues he has to fix Conda first, seriously?

FREECAD_USE_3DCONNEXION=
ninja: error: '/Users/markus/opt/miniconda3/envs/freecad_dev/lib/libtbb_debug.dylib', needed by 'Mod/Fem/Fem.so', missing and no known rule to make it
rm: /Users/markus/opt/miniconda3/envs/freecad_dev/share/doc/FreeCAD: No such file or directory
mv: rename /Users/markus/opt/miniconda3/envs/freecad_dev/bin/FreeCAD to /Users/markus/opt/miniconda3/envs/freecad_dev/bin/freecad: No such file or directory
mv: rename /Users/markus/opt/miniconda3/envs/freecad_dev/bin/FreeCADCmd to /Users/markus/opt/miniconda3/envs/freecad_dev/bin/freecadcmd: No such file or directory

in build/ I have set:
-D BUILD_FEM_NETGEN:BOOL=OFF

it's ignored, or has another purpose.


please if you use conda document it - the basics at least:

1. how to enable debugging
The default build is a Release build, in order to enable debugging:
FEATURE_DEBUG=1 ./build_unix_dev_conda.sh
build_unix_dev_conda.sh I would expect that it will be a development version, and not a stripped release version of the latest source.
(it's documented where?)
running it the first time wasted around 4 hours on that notebook, and it did not even start and also has no symbols.

2. how to turn on / off various modules
3. fix checking dependencies.

I don't really get the sense behind applying such a tool to a project and not fixing those issues.
fixus971
Posts: 1
Joined: Mon May 31, 2021 5:12 pm

How to launch an Conda app from windows Desktop?

Post by fixus971 »

Hi i have many practice with linux packages and i am happy to use choco and conda in windows 10 ..
Now I'm pushing FreeCAD Conda version because it makes me work an important macro.
First I installed the zip version and then from miniconda.
All without problems: from the console, I activate the env of FC and it starts.

But there is no indication of how to start FC from Windows 10 Desktop.

I tried to make a startup icon myself but FC tells me it can't find a python dll ..
probably need to activate its env: I found the command to do it but it doesn't accept a second command to run FC.
Do I have to go from a .bat?

I would also like FC to start automatically when I click a drawing file.

I'm use FreeCAD 19.2
on Windows10 with Python 3.8 on system
and Python 3.9 in FCenv of conda

Thank you for any clue.
-Federico
Post Reply