looo wrote: ↑Sun May 01, 2016 10:47 amHere is a short instruction how to install a python3 version of freecad with conda: (by now only a linux version is available, maybe someone want to make a conda paykage of freecad for windows and mac)
INSTALL MINICONDA:CREATE A NEW ENV
- first get miniconda: http://conda.pydata.org/miniconda.html choose python3 (it's not necessary, you could also choose python2, but then it will download python3 stuff in the "create-env-step")
- install miniconda: bash <miniconda-file>.sh (not as root!!!)
- at the end of the install it will ask you if you want to add the anaconda-dir to the $PATH, say yes.
- if you do not want anaconda to be the default python open the ~/.bashrc and edit the new line:
-from this: export PATH="path_to_anaconda/bin:$PATH"
-to this: alias initConda='export PATH="path_to_anaconda/bin:$PATH" '
: this way anaconda isn't perpended by default. As soon as you call "initConda" python will be the anaconda version.INSTALL FREECAD
- type in terminal: initConda (now the "conda" command should be available)
- create an env: conda create -n <env-name> python=3.5 # with <env-name> is the name of the env, eg. fc_test
(it will install some packages, but I think most of them are available within miniconda, so it will only link this packages to the env)- at the end of this process a short statement is printed how to activate the new env.: source activate <env-name>
- now you have a minimal setup of python (only packages in this env are available)
- first we have to add some channels to get all the necesarry packages:
- you can add them one by one with: conda config --add channels <name>
- or you can open the ~/.condarc and add them directly to this file
at the end this file should look like this:the channels hosting this libraries:Code: Select all
channels: - spyder-ide - dlr-sc - looooo - defaults
looooo: freecad, coin, pivy, boost,...
dlr-sc: oce
spyder-ide: libuci- install freecad: conda install freecad
- start freecad: FreeCAD
If you had freecad previously on your machine this will maybe work. otherwise there will be errors about missing libraries. Please report this and search if the missing packages are available on anaconda.org.
Currently we can not use latest conda-forge packages. But it's still possible to create environments for freecad by using the cf201901 label. So use this command to create the environment:
Code: Select all
conda create -n freecad freecad blas=*=openblas -c freecad/label/dev -c conda-forge/label/cf201901
Code: Select all
conda create -n freecad freecad blas=*=openblas -c freecad/label/testing -c conda-forge/label
Currently we can not use latest conda-forge packages. But it's still possible to create environments for freecad by using the cf201901 label. So use this command to create the environment:
Code: Select all
conda create -n freecad freecad blas=*=openblas -c freecad/label/dev -c conda-forge/label/cf201901
Code: Select all
conda create -n freecad freecad blas=*=openblas -c freecad/label/testing -c conda-forge/label
Code: Select all
$ for i in `grep -Rl '\-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include'` ; do sed -e 's?-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include??' $i >/tmp/junk ; mv /tmp/junk $i ; done
grep: warning: recursive search of stdin
<...nothing happens...>
federico.carminati wrote: ↑Tue Dec 11, 2018 9:40 amI managed to build FreeCAD on Mojave. After cmake I run
Really not elegant, but I think this is a cmake problem. best,Code: Select all
for i in `grep -Rl '\-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include'` ; do sed -e 's?-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include??' $i >/tmp/junk ; mv /tmp/junk $i ; done
Federico Carminati