FreeCAD Conda Distribution

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: FreeCAD Conda Distribution

Post by sgrogan »

ianj001 wrote: Fri Oct 16, 2020 11:00 pm I deleted it myself, it's gone.
Great! Now that you have it working do you mind to switch to the Test framework WB, and run Self-test from the toolbar?
I think you will get a bunch of FEM errors related to matplotlib

Code: Select all

conda install -c conda-forge matplotlib
and then run the tests again should fix it.
We bundle matplotlib after the fact on Travis, but if FEM has a hard dependency we should do this in the feedstock.
TIA
"fight the good fight"
User avatar
ianj001
Posts: 55
Joined: Fri Sep 22, 2017 2:38 pm
Location: USA

Re: FreeCAD Conda Distribution

Post by ianj001 »

sgrogan wrote: Sat Oct 17, 2020 7:59 pm
ianj001 wrote: Fri Oct 16, 2020 11:00 pm I deleted it myself, it's gone.
Great! Now that you have it working do you mind to switch to the Test framework WB, and run Self-test from the toolbar?
I think you will get a bunch of FEM errors related to matplotlib

Code: Select all

conda install -c conda-forge matplotlib
and then run the tests again should fix it.
We bundle matplotlib after the fact on Travis, but if FEM has a hard dependency we should do this in the feedstock.
TIA
Sure, I ran it the first time through:

Code: Select all

Error: TestFem (unittest.loader._FailedTest)
Failure: testActivate (Workbench.WorkbenchTestCase)
and

Code: Select all

Traceback (most recent call last):
  File "C:\Users\ianj0\miniconda3\envs\fcenv-dev\Library\Mod\PartDesign\TestPartDesignGui.py", line 55, in __call__
    self.test.assertIsNone(diag, "Dialog box could not be found")
  File "C:\Users\ianj0\miniconda3\envs\fcenv-dev\lib\unittest\case.py", line 1322, in assertIsNone
    self.fail(self._formatMessage(msg, standardMsg))
  File "C:\Users\ianj0\miniconda3\envs\fcenv-dev\lib\unittest\case.py", line 753, in fail
    raise self.failureException(msg)
AssertionError: <PySide2.QtWidgets.QMessageBox(0x17e7cf3d58) at 0x00000120907E8680> is not None : Dialog box could not be found
The second run was the same.
I ran FreeCAD from fcenv-dev - I hope that was correct.
trilbytim
Posts: 31
Joined: Mon Aug 03, 2020 5:10 pm

Re: FreeCAD Conda Distribution

Post by trilbytim »

Is there some way I can see what what the latest conda build has in it? I really need this fix https://github.com/FreeCAD/FreeCAD/commit/4719bb703d, how do I work out if that's in conda-forge or freecad/label/dev yet?

Also I have another problem in that I just can't install the unstable version. I installed the conda-forge version without issue, but I've tried running the command to install the freecad/label/dev and get the result below. Is it clashing with the conda-forge version. My understanding was that the whole point of conda is that it should be possible to have a fcenv and fcenv-dev environment and so be able to access the two versions independently so they shouldn't clash.

Code: Select all

:~$ conda create --name fcenv-dev --channel freecad/label/dev freecad
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: 
Don't seem to be any clues there for what went wrong!
UR_
Veteran
Posts: 1355
Joined: Tue Jan 03, 2017 8:42 pm

Re: FreeCAD Conda Distribution

Post by UR_ »

If Git is installed and FreeCAD sources are cloned, revisions can be obtained by

Code: Select all

C:\Users\aio\FreeCADcode>git rev-list --count 4719bb7
23965
Please verify value against revision number from Help->About FreeCAD


My .condarc looks like:

Code: Select all

channels:
  - freecad/label/dev
  - conda-forge
  - defaults
So channel conda-forge is needed too.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: FreeCAD Conda Distribution

Post by Kunda1 »

Anyone volunteer to bump the FreeCAD conda OCCT dependency to 7.5.1?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
trilbytim
Posts: 31
Joined: Mon Aug 03, 2020 5:10 pm

Re: FreeCAD Conda Distribution

Post by trilbytim »

Sorry for the slow reply:
Ah, so I hadn't realised that I needed to add conda-forge as a channel as well. On doing that the command

Code: Select all

conda create --name fcenv-dev --channel freecad/label/dev freecad
Does successfully run create a fcenv-dev environment, however running FreeCAD from it doesn't include the bug fix I'm after, this is what I get:

Code: Select all

OS: Ubuntu 20.04.2 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23778 (Git)
Build type: Release
Branch: master
Hash: 2f731b7da7b58cb320f977498feb03a91fa4bb24
Python version: 3.9.1
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United Kingdom (en_GB)
I do have the git repo for FC cloned on my machine, and running the rev list count in that directory does return the same as you (23965). However, I don't see that it looks at that local repo when it builds? Is there some way I can update it to use my local clone of the repo?
UR_
Veteran
Posts: 1355
Joined: Tue Jan 03, 2017 8:42 pm

Re: FreeCAD Conda Distribution

Post by UR_ »

trilbytim wrote: Sat Feb 20, 2021 4:45 pm Is there some way I can update it to use my local clone of the repo?
If you startup cmake, source's location has to be setup.

Screenshot 001.png
Screenshot 001.png (23.91 KiB) Viewed 1869 times
trilbytim
Posts: 31
Joined: Mon Aug 03, 2020 5:10 pm

Re: FreeCAD Conda Distribution

Post by trilbytim »

I'm not using cmake to compile my conda version, I've just followed the instructions here: https://wiki.freecadweb.org/Conda to install what I assume is a pre-compiled conda version. I also have a non-conda version compiled from source and the two conda versions, so I have loads of FreeCAD versions now!
In addition, I've now found this AppImage just come out so have this: https://github.com/FreeCAD/FreeCAD-AppI ... g/0.19-pre
Now this one it updated enough to include the bug fix in mesh trimming and it's also the conda version so includes the 'unwrap mesh' feature that I need, so is one version that does do what I need (Hooray!). So I am now up and running!
Cheers for your help, I'm going to seriously need a clearout of FreeCAD versions I have going on! Can I remove a conda environment (and so delete the FC version that's in it?
User avatar
onekk
Veteran
Posts: 6208
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: FreeCAD Conda Distribution

Post by onekk »

If I issue:

Code: Select all

conda update --all

I'm obtaining this:

Code: Select all

Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/carlo-arch/miniconda3/envs/fcenv-dev


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    ffmpeg-4.3.2               |       h37c90e5_2        90.0 MB  conda-forge
    freecad-0.19.3             |   py39h0f650a1_3        64.2 MB  conda-forge
    libllvm13-13.0.1           |       hf817b99_2        33.6 MB  conda-forge
    libnghttp2-1.47.0          |       h727a467_0         808 KB  conda-forge
    ------------------------------------------------------------
                                           Total:       188.6 MB

The following packages will be REMOVED:

  aom-3.2.0-h9c3ff4c_2
  libdrm-2.4.109-h7f98852_0
  libpciaccess-0.16-h516909a_0
  libva-2.14.0-h7f98852_0
  libvpx-1.11.0-h9c3ff4c_3
  svt-av1-0.9.0-h27087fc_1
  x265-3.5-h4bd325d_1

The following packages will be UPDATED:

  libllvm13                               13.0.1-hf817b99_1 --> 13.0.1-hf817b99_2
  libnghttp2                              1.46.0-h812cca2_0 --> 1.47.0-h727a467_0

The following packages will be SUPERSEDED by a higher-priority channel:

  freecad            freecad/label/dev::freecad-0.20.pre-p~ --> conda-forge::freecad-0.19.3-py39h0f650a1_3

The following packages will be DOWNGRADED:

  ffmpeg                                   4.4.1-h6987444_1 --> 4.3.2-h37c90e5_2


Proceed ([y]/n)? n


CondaSystemExit: Exiting.

In other word it wnat to substitute FC development with FC stable.

How to avoid this?


The problem will arise when a new development release is done, I don't know if it follow the weekly-build mechanism or it is updating daily.


Sadly:

https://wiki.freecadweb.org/Conda

Is lacking of these informations, or maybe I could not find them.

Apologize if this is a duplicate post, of:

https://forum.freecadweb.org/viewtopic. ... 57#p574557

but I don't know where to ask.


Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: FreeCAD Conda Distribution

Post by looo »

can you show the output of:

Code: Select all

conda config --show channels
Post Reply