ana(conda) windows packaging

Having trouble installing or compiling FreeCAD? Get help here.
User avatar
sgrogan
Posts: 5469
Joined: Wed Oct 22, 2014 5:02 pm

Re: ana(conda) windows packaging

Postby sgrogan » Sat Aug 25, 2018 5:23 pm

Log: D:\Programowanie\free-cad-code\FreeCADLibs_11.5.3_x64_VC12\doxygen\bin
Well this is definitely wrong.
I would first try to delete D:\Programowanie\Anaconda3\envs\freecad_py3\Library\CMakeCache.txt
Run the .bat file
In VS build > Clean all, then Build all.
If this doesn't work maybe your FreeCAD source repo is polluted from an earlier in-source build attempt.
User avatar
zbigg
Posts: 136
Joined: Tue Dec 19, 2017 1:11 pm

Re: ana(conda) windows packaging

Postby zbigg » Sat Aug 25, 2018 8:30 pm

There was actually outdated env variable/you mentioned/ which I removed and then proceeded as per your advice but it did not help so far.
cheers,
UR_
Posts: 1014
Joined: Tue Jan 03, 2017 8:42 pm

Re: ana(conda) windows packaging

Postby UR_ » Tue Aug 28, 2018 5:42 pm

Follow up repeating build mentioned here: https://forum.freecadweb.org/viewtopic. ... 44#p252930

I tried:

Code: Select all

(base) C:\Users\aio>conda activate freecad_py3
(freecad_py3) C:\Users\aio>conda install gitpython --dry-run
Solving environment: done

## Package Plan ##

  environment location: C:\Users\aio\Miniconda3\envs\freecad_py3

  added / updated specs:
    - gitpython


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    clangdev-5.0.0             |          flang_3       189.0 MB  conda-forge
    openmp-5.0.0               |           vc14_0         576 KB  conda-forge
    gitdb2-2.0.4               |             py_0          44 KB  conda-forge
    blas-1.0                   |              mkl           6 KB
    sqlite-3.22.0              |           vc14_0         907 KB  conda-forge
    gitpython-2.1.11           |             py_0         335 KB  conda-forge
    smmap2-2.0.4               |             py_0          20 KB  conda-forge
    ------------------------------------------------------------
                                           Total:       190.8 MB

The following NEW packages will be INSTALLED:

    clangdev:        5.0.0-flang_3                         conda-forge [flang,vc14   ]
    gitdb2:          2.0.4-py_0                            conda-forge
    gitpython:       2.1.11-py_0                           conda-forge
    smmap2:          2.0.4-py_0                            conda-forge

The following packages will be UPDATED:

    ca-certificates: 2018.8.13-ha4d7672_0                  conda-forge --> 2018.8.24-ha4d7672_0        conda-forge
    certifi:         2018.8.13-py36_0                      conda-forge --> 2018.8.24-py36_0            conda-forge

The following packages will be DOWNGRADED:

    blas:            1.1-openblas                          conda-forge --> 1.0-mkl
    boost-cpp:       1.67.0-vc14_0                         conda-forge [vc14         ] --> 1.66.0-vc14_1               conda-forge [vc14]
    coin3d:          4.0.0-h037026a_4                      conda-forge --> 4.0.0-hcce0f6f_3            conda-forge
    curl:            7.61.0-he44d5f6_1                     conda-forge --> 7.60.0-vc14_0               conda-forge [vc14]
    freecad:         0.18b0-py36ha567227_3                 conda-forge --> 0.18b0-py36h0c05c59_2       conda-forge
    jpeg:            9c-hfa6e2cd_0                         conda-forge --> 9b-vc14_2                   conda-forge [vc14]
    libiconv:        1.15-hfa6e2cd_2                       conda-forge --> 1.14-vc14_4                 conda-forge [vc14]
    libnetcdf:       4.6.1-vc14_2                          conda-forge [vc14         ] --> 4.4.1.1-vc14_10             conda-forge [vc14]
    libxml2:         2.9.8-h9ce36c8_3                      conda-forge --> 2.9.5-vc14_1                conda-forge [vc14]
    netgen:          6.2.1804-py36he980bc4_1               cad         --> 6.2.1804-py36_vc14_0        conda-forge [vc14]
    numpy:           1.15.0-py36_blas_openblash8d851b4_200 conda-forge [blas_openblas] --> 1.14.2-py36h5c71026_1
    occt:            7.3.0-h39117bb_0                      cad         --> 7.2.0-vc14_3                conda-forge [vc14]
    openmp:          6.0.1-h1ad3211_0                      conda-forge --> 5.0.0-vc14_0                conda-forge [vc14]
    pivy:            0.6.4-py36hc28f30b_0                  conda-forge --> 0.6.4b2-py36_vc14_0         conda-forge [vc14]
    smesh:           8.3.0b0-py36h7731f85_9                conda-forge --> 8.3.0b0-py36_vc14_7         conda-forge [vc14]
    sqlite:          3.24.0-hb652765_0                     conda-forge --> 3.22.0-vc14_0               conda-forge [vc14]
    vtk:             8.1.1-py36h5d67d3e_203                conda-forge --> 8.1.1-py36_vc14h99a48a5_200 conda-forge [vc14]


DryRunExit: Dry run exiting


(freecad_py3) C:\Users\aio>
conda tries to downgrade occt 7.3.0 to occt 7.2.0 :shock:

Your build still uses 7.3.0, so how to circumvent downgrading while installing gitpython?
User avatar
sgrogan
Posts: 5469
Joined: Wed Oct 22, 2014 5:02 pm

Re: ana(conda) windows packaging

Postby sgrogan » Tue Aug 28, 2018 5:58 pm

UR_ wrote:
Tue Aug 28, 2018 5:42 pm
conda tries to downgrade occt 7.3.0 to occt 7.2.0

Your build still uses 7.3.0, so how to circumvent downgrading while installing gitpython?
I didn't rebuild, only copied the relevant packages to the portable build.
I'll let you know how I fixed it, after I figure out how tho fix it. ;)
looo
Posts: 2951
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Postby looo » Tue Aug 28, 2018 7:24 pm

conda Install gitpython occt=7.3.*
please help with my conda-packaging efforts: https://liberapay.com/looooo/
User avatar
sgrogan
Posts: 5469
Joined: Wed Oct 22, 2014 5:02 pm

Re: ana(conda) windows packaging

Postby sgrogan » Tue Aug 28, 2018 9:35 pm

sgrogan wrote:
Tue Aug 28, 2018 5:58 pm
I'll let you know how I fixed it, after I figure out how tho fix it. ;)
Turns out I'm good, maybe because I created the environment forcing occt7.3 at the beginning?
User avatar
sgrogan
Posts: 5469
Joined: Wed Oct 22, 2014 5:02 pm

Re: ana(conda) windows packaging

Postby sgrogan » Tue Aug 28, 2018 11:18 pm

looo wrote:
Tue Aug 28, 2018 7:24 pm
ping
I think you've told me before, but I can't find it.
Is there a way to use pip from FreeCAD's (conda based) python console to install (pure)python packages to %appdata%/FreeCAD/Mod?
This would make these packages persistent after an update of the portable builds.

Thanks again, we've had some good results with PY3/pybind11/QT5 testing recently on Win thanks to your work.
looo
Posts: 2951
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Postby looo » Wed Aug 29, 2018 12:45 am

sgrogan wrote:
Tue Aug 28, 2018 11:18 pm
looo wrote:
Tue Aug 28, 2018 7:24 pm
ping
I think you've told me before, but I can't find it.
Is there a way to use pip from FreeCAD's (conda based) python console to install (pure)python packages to %appdata%/FreeCAD/Mod?
This would make these packages persistent after an update of the portable builds.

Thanks again, we've had some good results with PY3/pybind11/QT5 testing recently on Win thanks to your work.
I guess sys.path is used for the installation process (pip). Can you post sys.path for the portable build?
edit.: Maybe we can try to get my pip-integration-tool work with portable builds.
please help with my conda-packaging efforts: https://liberapay.com/looooo/
looo
Posts: 2951
Joined: Mon Nov 11, 2013 5:29 pm

Re: ana(conda) windows packaging

Postby looo » Wed Aug 29, 2018 10:37 am

%appdata%/FreeCAD/Mod?
The difficulties come with the dependencies of packages (for example if one package depends on numpy/scipy)... I guess we have to restrict the freecad-intern use of pip to 1. no automatic dependency installation, 2. only predefined packages to make this work for a portable build.

Would it be possible to install a pypi package into %Prefix%/lib/python3.6/...? This would make things easier as the packages are not installed globally (installed for all versions of freecad on the system). (For appimages this is for sure not possible)
please help with my conda-packaging efforts: https://liberapay.com/looooo/
User avatar
sgrogan
Posts: 5469
Joined: Wed Oct 22, 2014 5:02 pm

Re: ana(conda) windows packaging

Postby sgrogan » Wed Aug 29, 2018 9:09 pm

looo wrote:
Wed Aug 29, 2018 12:45 am
I guess sys.path is used for the installation process (pip). Can you post sys.path for the portable build?

Code: Select all

>>> for p in sys.path: print(p)
... 
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\Drawing
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\Inspection
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\Idf
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\AddonManager
C:\Users\Chris\AppData\Roaming\FreeCAD\Mod\python27_x64-ocl
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\Robot
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\Arch
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\Part
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\Path
C:\Users\Chris\AppData\Roaming\FreeCAD\Mod\libs
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\Mesh
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\Raytracing
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\Material
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\Web
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\Complete
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\Tux
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\TechDraw
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\Import
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\Test
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\Draft
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\Points
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\Start
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\Spreadsheet
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\Fem
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\OpenSCAD
C:\Users\Chris\AppData\Roaming\FreeCAD\Mod\dxfwrite-1.2.0
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\MeshPart
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\Plot
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\Ship
C:\Users\Chris\AppData\Roaming\FreeCAD\Mod\lattice2
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\Measure
C:\Users\Chris\AppData\Roaming\FreeCAD\Mod\FreeCAD-Lithophane
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\PartDesign
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\Surface
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\Image
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\Show
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\ReverseEngineering
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod\Sketcher
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Mod
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\lib64
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\lib
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Ext
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\bin
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\bin\lib\site-packages\six-1.8.0-py2.7.egg
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\bin\lib\site-packages\pyparsing-2.0.3-py2.7.egg
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\bin\lib\site-packages\python_dateutil-2.2-py2.7.egg
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\bin\lib\site-packages\pycollada-0.4.1-py2.7.egg
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\bin\python27.zip
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\bin\DLLs
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\bin\lib
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\bin\lib\plat-win
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\bin\lib\lib-tk
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\bin
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\bin\lib\site-packages
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\bin\lib\site-packages\setuptools-5.4.1-py2.7.egg
C:/Users/Chris/AppData/Roaming/FreeCAD/Macro
C:\Users\Chris\GitHub\FCAutoBuild\var\build_x64_VC12\Macro
Notice that I have some python modules that I have manually installed in %appdata%/roaming/freecad, and they work from a Windows installed build or a portable build. They don't work when FreeCAD is started from a conda prompt, although the path shows up in sys.path from FreeCAd's python console.

I'll move further pip discussions here: https://forum.freecadweb.org/viewtopic. ... 4&start=10