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: Mon Oct 12, 2020 10:29 pm I checked that "C:/Users/ianj0/miniconda3/envs/fcenv-dev/Library/include/qt" exists and contains the Qt stuff.
I don't understand why it's not working.
Does C:\Users\username\Miniconda3\envs\fcenv-dev\Library\plugins\platforms\qwindows.dll exist?
Hacky, but maybe try to copy this file to C:\Users\username\Miniconda3\envs\fcenv-dev\Library\bin\qwindows.dll

I don't have a system installed python/QT. Maybe the conda env is not as isolated as it should be?
conda list gives me this

Code: Select all

(base) C:\Users\Chris>conda activate fcenv-dev

(fcenv-dev) C:\Users\Chris>conda list
# packages in environment at C:\Users\Chris\Miniconda3\envs\fcenv-dev:
#
# Name                    Version                   Build  Channel
boost-cpp                 1.72.0               hd4e6614_3    conda-forge
bzip2                     1.0.8                he774522_3    conda-forge
ca-certificates           2020.6.20            hecda079_0    conda-forge
certifi                   2020.6.20        py38h9bdc248_2    conda-forge
coin3d                    4.0.0             h84d8830_1010    conda-forge
curl                      7.71.1               h4b64cdc_8    conda-forge
expat                     2.2.9                h33f27b4_2    conda-forge
flann                     1.9.1             h3a160d9_1008    conda-forge
fontconfig                2.13.1            hdcb13c4_1002    conda-forge
freecad                   0.19.pre        py38h992f965_152    freecad/label/dev
freeimage                 3.18.0               h33f27b4_0    conda-forge
freetype                  2.10.3               hd328e21_0    conda-forge
future                    0.18.2           py38h32f6830_1    conda-forge
hdf4                      4.2.13            hf8e6fe8_1003    conda-forge
hdf5                      1.10.6          nompi_he0bbb20_101    conda-forge
icu                       67.1                 h33f27b4_0    conda-forge
intel-openmp              2020.1                      216
jpeg                      9d                   he774522_0    conda-forge
jsoncpp                   1.8.4             h1ad3211_1002    conda-forge
krb5                      1.17.1               hc04afaa_3    conda-forge
libblas                   3.8.0                    16_mkl    conda-forge
libcblas                  3.8.0                    16_mkl    conda-forge
libclang                  10.0.1          default_hf44288c_1    conda-forge
libcurl                   7.71.1               h4b64cdc_8    conda-forge
libiconv                  1.16                 he774522_0    conda-forge
liblapack                 3.8.0                    16_mkl    conda-forge
libnetcdf                 4.7.4           nompi_h256d12c_105    conda-forge
libpng                    1.6.37               ha81a0f5_2    conda-forge
libssh2                   1.9.0                hb06d900_5    conda-forge
libtiff                   4.1.0                h885aae3_6    conda-forge
libxml2                   2.9.10               h1006b36_2    conda-forge
libxslt                   1.1.33               h579f668_1    conda-forge
lz4-c                     1.9.2                h62dcd97_2    conda-forge
mkl                       2020.1                      216
netgen                    6.2.1808        py38hb990d29_1007    conda-forge
numpy                     1.19.2           py38hdf1ac2f_1    conda-forge
occt                      7.4.0                h3ad41be_7    conda-forge
openssl                   1.1.1h               he774522_0    conda-forge
pcl                       1.11.1               ha8ca851_1    conda-forge
pip                       20.2.3                     py_0    conda-forge
pivy                      0.6.6.a0         py38h026d3d0_0    conda-forge
ply                       3.11                       py_1    conda-forge
pthreads-win32            2.9.1                hfa6e2cd_3    conda-forge
pyside2                   5.13.2           py38h6cd2493_2    conda-forge
python                    3.8.6           h60c2a47_0_cpython    conda-forge
python_abi                3.8                      1_cp38    conda-forge
pyyaml                    5.3.1            py38hab1e662_1    conda-forge
qhull                     2019.1               h7266db4_0    conda-forge
qt                        5.12.9               hb2cf2c5_0    conda-forge
setuptools                49.6.0           py38h9bdc248_2    conda-forge
six                       1.15.0             pyh9f0ad1d_0    conda-forge
smesh                     8.3.0.3         py38hc60e02b_10    conda-forge
soqt                      1.6.0                h95c7cbc_1    conda-forge
sqlite                    3.33.0               he774522_1    conda-forge
tbb                       2020.1               he980bc4_0    conda-forge
tk                        8.6.10               he774522_1    conda-forge
vc                        14.1                 h869be7e_1    conda-forge
vs2015_runtime            14.16.27012          h30e32a0_2    conda-forge
vtk                       8.2.0           py38h1e1109e_218    conda-forge
wheel                     0.35.1             pyh9f0ad1d_0    conda-forge
wincertstore              0.2             py38h32f6830_1005    conda-forge
xerces-c                  3.2.3                ha925a31_1    conda-forge
xz                        5.2.5                h62dcd97_1    conda-forge
yaml                      0.2.5                he774522_0    conda-forge
zlib                      1.2.11            h62dcd97_1009    conda-forge
zstd                      1.4.5                h1f3a1b7_2    conda-forge

(fcenv-dev) C:\Users\Chris>
"fight the good fight"
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: FreeCAD Conda Distribution

Post by looo »

sgrogan wrote: Mon Oct 12, 2020 10:40 pm Maybe the conda env is not as isolated as it should be?
Can you try to see if the conda qt-library is somehow hidden.

Code: Select all

where Qt5Core.dll
https://github.com/ContinuumIO/anaconda ... -623118786
User avatar
ianj001
Posts: 55
Joined: Fri Sep 22, 2017 2:38 pm
Location: USA

Re: FreeCAD Conda Distribution

Post by ianj001 »

sgrogan wrote: Mon Oct 12, 2020 10:40 pm Does C:\Users\username\Miniconda3\envs\fcenv-dev\Library\plugins\platforms\qwindows.dll exist?
Hacky, but maybe try to copy this file to C:\Users\username\Miniconda3\envs\fcenv-dev\Library\bin\qwindows.dll
It did exist at C:\Users\username\Miniconda3\envs\fcenv-dev\Library\plugins\platforms\qwindows.dll

I copied it as you suggested and now it works....
User avatar
ianj001
Posts: 55
Joined: Fri Sep 22, 2017 2:38 pm
Location: USA

Re: FreeCAD Conda Distribution

Post by ianj001 »

looo wrote: Tue Oct 13, 2020 10:01 am
Can you try to see if the conda qt-library is somehow hidden.

Code: Select all

where Qt5Core.dll
https://github.com/ContinuumIO/anaconda ... -623118786
Here is the result:
(fcenv-dev) c:\Users\ianj0\miniconda3\envs\fcenv-dev\Library\bin>where Qt5Core.dll
INFO: Could not find files for the given pattern(s).

I looked at the link that you posted but they were messing with the system PATH and the fcenv-dev PATH so I didn't do that.
Here is my path in that env:

Code: Select all

(fcenv-dev) c:\Users\ianj0\miniconda3\envs\fcenv-dev\Library\bin>PATH
PATH=C:\Users\ianj0\miniconda3\envs\fcenv-dev;C:\Users\ianj0\miniconda3\envs\fcenv-dev\Library\mingw-w64\bin;C:\Users\ianj0\miniconda3\envs\fcenv-dev\Library\usr\bin;C:\Users\ianj0\miniconda3\envs\fcenv-dev\Library\bin;C:\Users\ianj0\miniconda3\envs\fcenv-dev\Scripts;C:\Users\ianj0\miniconda3\envs\fcenv-dev\bin;C:\Users\ianj0\miniconda3\condabin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\PuTTY;C:\Program Files\Git\cmd;C:\Program Files\Inkscape\bin;C:\Users\ianj0\AppData\Local\Programs\Python\Python38-32\Scripts;C:\Users\ianj0\AppData\Local\Programs\Python\Python38-32;C:\Users\ianj0\AppData\Roaming\Python\Python38\Scripts;C:\Users\ianj0\AppData\Local\Microsoft\WindowsApps;C:\Users\ianj0\AppData\Local\Programs\Microsoft VS Code\bin;.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: FreeCAD Conda Distribution

Post by looo »

ianj001 wrote: Tue Oct 13, 2020 1:42 pm
sgrogan wrote: Mon Oct 12, 2020 10:40 pm Does C:\Users\username\Miniconda3\envs\fcenv-dev\Library\plugins\platforms\qwindows.dll exist?
Hacky, but maybe try to copy this file to C:\Users\username\Miniconda3\envs\fcenv-dev\Library\bin\qwindows.dll
It did exist at C:\Users\username\Miniconda3\envs\fcenv-dev\Library\plugins\platforms\qwindows.dll

I copied it as you suggested and now it works....
good you have found a way to solve this, but still it would be nice to find the reason for the issue. I still belive there must be another qt-installation which hides the conda qt library. This might happen with some environment variables. Maybe doing something like this in python:

Code: Select all

import os
print({key: value for key, value in os.environ.items() if "qt" in key or "Qt" in key or "QT" in key})
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: FreeCAD Conda Distribution

Post by sgrogan »

ianj001 wrote: Tue Oct 13, 2020 1:42 pm I copied it as you suggested and now it works....
This isn't really a fix as there will for sure be other QT stuff that is found later.
"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 »

looo wrote: Tue Oct 13, 2020 3:48 pm good you have found a way to solve this, but still it would be nice to find the reason for the issue. I still belive there must be another qt-installation which hides the conda qt library. This might happen with some environment variables. Maybe doing something like this in python:

Code: Select all

import os
print({key: value for key, value in os.environ.items() if "qt" in key or "Qt" in key or "QT" in key})
I agree, it is definitely odd that it's not set up. - I may try uninstalling freecad and reinstalling in the fcdev-env just to see if that makes a difference.

The output from what you asked for was

(fcenv-dev) c:\Users\ianj0\miniconda3\envs\fcenv-dev>python test.py
{}

I also ran it just from a cmd window outside of the Conda environment with the same result.
User avatar
ianj001
Posts: 55
Joined: Fri Sep 22, 2017 2:38 pm
Location: USA

Re: FreeCAD Conda Distribution

Post by ianj001 »

I did a

Code: Select all

conda uninstall freecad
then I did a

Code: Select all

conda install freecad
now it works without the copied file.

I did notice in the fcenv when I did a

Code: Select all

conda update freecad
it wanted to install version 0.18???
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: FreeCAD Conda Distribution

Post by sgrogan »

ianj001 wrote: Tue Oct 13, 2020 8:13 pm it wanted to install version 0.18???
Are you sure you got 0.19 when you re-installed? I would think conda-forge would be searched if -c FreeCAD/label/dev is not specified.
ianj001 wrote: Tue Oct 13, 2020 8:13 pm now it works without the copied file.
Are you sure the copied file was deleted when uninstalling FreeCAD?
"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: Tue Oct 13, 2020 9:30 pm
ianj001 wrote: Tue Oct 13, 2020 8:13 pm it wanted to install version 0.18???
Are you sure you got 0.19 when you re-installed? I would think conda-forge would be searched if -c FreeCAD/label/dev is not specified.

Yes, I have 0.19Alpha and 0.19 installed.
ianj001 wrote: Tue Oct 13, 2020 8:13 pm now it works without the copied file.
Are you sure the copied file was deleted when uninstalling FreeCAD?
I deleted it myself, it's gone.
Post Reply