Skip to content

FreeCAD/FreeCAD_Conda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CONDA-PACKAGES for FreeCAD

feel free to support this project:
Liberapay

Conda gives the opportunity to distribute FreeCAD in a consistent way for multiple platforms. This is the biggest advantage of conda: A package-manager which works in the same way for different platforms.

Read more about conda...

Note: find more indepth info about conda on their website.

What is conda?

conda is a cross-plattform package-manager written in python similar to pip. The main advantage over pip is a very simple way to create packages for more difficult libraries which are not written in python and often need some special dependencies to get build. So conda fits in somewhere between system-package-managers like apt and yum and pip. But conda is not only usable for python. There are also a lot of packages for other interpreters available (eg.: R)

What is anaconda?

anaconda is a distribution of common conda-packages bundled in one installable archive. Installing anaconda is a very simple way to get many of the scintific python-packages. Anaconda is available in version 2 and 3. The version number refers to the python version of the root-environment. But there is always the option to create an environment with python2 /python3 from any of those two. So my suggestion is to always use Anaconda3!

What is miniconda?

miniconda is similar to anaconda, but only bundles a little subset of packages. Miniconda aims to be a minimalistic installation for the conda-package-manager. With the conda-package-manager you are able to install any package which is provided by Anaconda, and many more.

What are environments?

An environment has it's own environment-variables and an own directory structure. With environments it's possible to use different dependency-structures which is very useful for development and staying up to date with some of the latest packages while still having stable versions. Maybe the most important advantage of development in environments is the fact that you don't have to make any changes to your system and therefore can ran the latest packages on a very stable (old) system. Such environments are not a new idea. This is also available through the python-package virtual-env.

What is conda-build?

conda-build is a python-package to create packages for the conda-package-manager. conda-build provides some simple commands to package any kind of programs. Mainly this is done by a meta.yaml file where all dependencies and build-commands are specified. For more complex packages there are scripts (build.sh, build.bat) used to do the installation. Maintainer have to simple build and install some sources in a conda-build-environment and conda-build takes care of creating the package.

What is conda-forge?

conda-forge is the community channel for conda-packages. It provides a really big set of packages. All major dependencies of FreeCAD are available from the conda-forge-channel.

FreeCAD Dependency Packaging Status

Name Downloads Version Platforms Last Update License
Conda Recipe Conda Downloads Conda Version Conda Platforms
Conda Recipe Conda Downloads Conda Version Conda Platforms
Conda Recipe Conda Downloads Conda Version Conda Platforms
Conda Recipe Conda Downloads Conda Version Conda Platforms
Conda Recipe Conda Downloads Conda Version Conda Platforms
Conda Recipe Conda Downloads Conda Version Conda Platforms
Conda Recipe Conda Downloads Conda Version Conda Platforms
Conda Recipe Conda Downloads Conda Version Conda Platforms
Conda Recipe Conda Downloads Conda Version Conda Platforms
Conda Recipe Conda Downloads Conda Version Conda Platforms
Conda Recipe Conda Downloads Conda Version Conda Platforms
Conda Recipe Conda Downloads Conda Version Conda Platforms
Conda Recipe Conda Downloads Conda Version Conda Platforms
Conda Recipe Conda Downloads Conda Version Conda Platforms
Conda Recipe Conda Downloads Conda Version Conda Platforms
Conda Recipe Conda Downloads Conda Version Conda Platforms
Conda Recipe Conda Downloads Conda Version Conda Platforms
Conda Recipe Conda Downloads Conda Version Conda Platforms
Conda Recipe Conda Downloads Conda Version Conda Platforms
pyocct --- 7.2.0 Linux / OSX cad-channel ---
solvespace

How to clone this repo:

git clone https://github.com/FreeCAD/FreeCAD_Conda
cd FreeCAD_Conda
git submodule update --init

How to Install FreeCAD WITH CONDA

1. Install Miniconda:

Linux and OSX (install script)

  1. Download miniconda: http://conda.pydata.org/miniconda.html (choose 64-bit)
  2. Install miniconda: bash miniconda-file.sh (Not as root!!!)
  3. Before the installation is complete it will ask you if you want to always initialize the base environment:
Do you wish the installer to initialize Miniconda3
by running conda init? [yes|no]
  1. If the answer is yes (recommended), the installer will append a section for initializing conda by default at the end of .bashrc. To avoid any system-errors to due different python-versions it's best to set the autoactivation of the base environment to false: conda config --set auto_activate_base false

To activate the base-environment simple type: conda activate base

Windows (graphical installer)

2. Installing FreeCAD

Adding conda-forge to the channels

First we have to add the conda-forge channel:
conda config --add channels conda-forge

Optional: Add freecad development channel:

If you want to use builds from recent master-branch of freecad you can add the channel freecad/label/dev: conda config --add channels freecad/label/dev

Create new environment

This depends on your platform.

Windows:

  • Open the anaconda prompt/terminal
  • Create an env by invoking: conda create -n env-name freecad > # with is the name of the env, eg. fc_test (this will install all necessary packages needed to run FreeCAD)
  • activate <env-name>
  • start FreeCAD by entering: FreeCAD

Linux and OSX

  • In the terminal, type our alias initConda (which we created in the previous section) to add anaconda python to our $PATH. The conda command should now be available.
  • Create an env:
conda create -n env-name freecad 
# with <env-name> is the name of the env, eg. fc_test
# (this will install all necessary packages needed to run FreeCAD)
  • At the end of this process a short statement is printed how to activate the new env:
conda activate <env-name>
  • Start FreeCAD by typing: FreeCAD

Use specific dependency versions

To create an environment with specific versions of packages you can add these packages with versions to the create command. This will give you the opportunity to reproduce an environment. eg.: in case some newer dependencies are broken.

conda create -n freecad freecad=0.17=py35_0 netgen=6.1=5 ...

Additional Information

Some important commands:

conda env list               # list all environments
conda list                   # list all packages in current env
conda env remove -n <name>   # Remove environment
conda update --all           # update all
conda config --show-sources  # show channels

Label definitions for freecad-channel

main: releases
dev: development snapshots eg.: weekly builds of latests sources
testing: testing for new dependencies, additional stuff