Could someone make a .19 conda version with python 3.7 to work with blender3d?

This subforum is specifically to discuss packaging issues on different platforms (windows, mac, linux), and using different packaging systems (conda, etc...)
Syres
Veteran
Posts: 1704
Joined: Thu Aug 09, 2018 11:14 am

Re: Could someone make a .19 conda version with python 3.7 to work with blender3d?

Post by Syres »

Any Python 3.7.x based recent FreeCAD build will work with Blender 2.82a as the Blender Institute have stipulated that this year they will keep Python 3.7.4 unless there's a show stopping need to upgrade as they are now having a Long Term Support strategy for the animation studios primarily.

Creating a Conda Environment is different to a distributable build as I have found out so unfortunately I can't help on that front but the Conda process was pretty easy, I know nothing about Conda before trying it this morning.

1) Download MiniConda3 from https://docs.conda.io/en/latest/miniconda.html click the Python 3.7 Miniconda3 Windows 64-bit version
2) Choose a suitable HDD/SSD with enough space and install to that partition, I would personally recommend against C:\Program Files unless you have no alternative, I installed for All Users, otherwise accept all defaults that the installer presents.
3) Click Start > All Programs > Anaconda3 (64-bit) > Anaconda Prompt (Miniconda3) you don't want the Powershell version

Now it's a case of typing in the Anaconda prompt following @looo's steps

4)

Code: Select all

conda config --add channels conda-forge
5)

Code: Select all

conda create -n freecad37 freecad python=3.7.6
6)

Code: Select all

conda activate freecad37
to test FreeCAD actually functions, type
7)

Code: Select all

freecad
You can now close FreeCAD and deactive the environment by typing
8)

Code: Select all

conda deactivate
and to close the Anaconda Prompt
9)

Code: Select all

exit
I wrote a step-by-step procedure for the Blender side of things if you want to double check that is configured correctly based on @s-light's importer, so it's been recently tested by another forum member, see https://forum.freecadweb.org/viewtopic. ... 60#p390746
bkjernisted
Posts: 17
Joined: Mon Jan 06, 2020 5:38 pm

Re: Could someone make a .19 conda version with python 3.7 to work with blender3d?

Post by bkjernisted »

Thanks Syres. Do I install the latest freecad to my program files using an executable file? Then follow your process?
Syres
Veteran
Posts: 1704
Joined: Thu Aug 09, 2018 11:14 am

Re: Could someone make a .19 conda version with python 3.7 to work with blender3d?

Post by Syres »

bkjernisted wrote: Sun May 10, 2020 4:54 pm Do I install the latest freecad to my program files using an executable file? Then follow your process?
Nope, just follow the process and you'll end up with a folder structure that wherever your Miniconda3 folder is will result in ...\Miniconda3\envs\freecad37\Library\bin\ and that's where you'll point the FreeCAD Importer to in step 6 of the Blender instructions I linked at the end of the previous post. In my case it's

Code: Select all

G:\MyProgs\Miniconda3\envs\freecad37\Library\bin\
bkjernisted
Posts: 17
Joined: Mon Jan 06, 2020 5:38 pm

Re: Could someone make a .19 conda version with python 3.7 to work with blender3d?

Post by bkjernisted »

Thank you Syres.
cricetus
Posts: 3
Joined: Tue Jul 19, 2022 1:00 pm

Re: Could someone make a .19 conda version with python 3.7 to work with blender3d?

Post by cricetus »

Tried this process with Blender 2.83 (Python 3.7) and Freecad 0.19 on a Windows 10 machine and it did work initially for a day or so.
But now I always get "Unknown runtime error occurred while initiating FreeCAD" whenever I try to start FreeCad via the Anaconda Prompt.

Tried several reboots, un- and reinstalling both Miniconda and Freecad but always get the same result. Opening Freecad by itself outside of conda works fine, but then the Blender exporter add-on won't work. Maybe I should mention that I orignally had three versions of Freecad (0.18, 0,19, 0.20) installed when it did work, now I have 0.18 and 0.19.

Any hints on how I can get this to work again or find some other way of exchanging files between Freecad and Blender?
adrianinsaval
Veteran
Posts: 3539
Joined: Thu Apr 05, 2018 5:15 pm

Re: Could someone make a .19 conda version with python 3.7 to work with blender3d?

Post by adrianinsaval »

does it work with 0.20 from conda? Try redoing your freecad conda env
cricetus
Posts: 3
Joined: Tue Jul 19, 2022 1:00 pm

Re: Could someone make a .19 conda version with python 3.7 to work with blender3d?

Post by cricetus »

Thanks for the reply. I reinstalled 0.20 and redid the freecad 37 env, but same problem. In fact, when I try to start 0.20 outside of conda, I get the same error message, which was the reason I de-installed in the first place.
adrianinsaval
Veteran
Posts: 3539
Joined: Thu Apr 05, 2018 5:15 pm

Re: Could someone make a .19 conda version with python 3.7 to work with blender3d?

Post by adrianinsaval »

how would you run outside of conda a version that is meant to run from conda? How did you install freecad 0.20? notice you need to install freecad trhough conda in the conda env (and this obviously needs to run in the conda env), not with the installer.
cricetus
Posts: 3
Joined: Tue Jul 19, 2022 1:00 pm

Re: Could someone make a .19 conda version with python 3.7 to work with blender3d?

Post by cricetus »

Good question, and something tells me the solution might lie there.

I’m not a programmer and I don’t know anything about conda or environments, all I did was follow the process Syres lined out. The Freecad versions were already installed on my computer before that.
Post Reply