Install

Conan can be installed in many Operating Systems. It has been extensively used and tested in Windows, Linux (different distros), OSX, and is also actively used in FreeBSD and Solaris SunOS. There are also several additional operating systems on which it has been reported to work.

There are different ways to install Conan:

  1. The preferred and strongly recommended way to install Conan is from PyPI, the Python Package Index, using the pip command.
  2. Use a system installer, or create your own self-contained Conan executable, to not require Python in your system.
  3. Running Conan from sources.

Use a system installer or create a self-contained executable

There will be a number of existing installers in Conan downloads for OSX Brew, Debian, Windows, Linux Arch, that will not require Python first.

Note

These installers are not available at the moment of the 2.0 launch, but we will work to make them available after the launch. Please use the pip install or create your own self-contained executable using this instructions in the meantime.

If there is no installer for your platform, you can create your own Conan executable, with the pyinstaller.py utility in the repo. This process is able to create a self-contained Conan executable that contains all it needs, including the Python interpreter, so it wouldn’t be necessary to have Python installed in the system.

You can do it with:

$ git clone https://github.com/conan-io/conan conan_src
$ cd conan_src
$ git checkout develop2 # or to the specific tag you want to
$ pip install -e .
$ python pyinstaller.py

It is important to install the dependencies and the project first with pip install -e . which configures the project as “editable”, that is, to run from the current source folder. After creating the executable, it can be uninstalled with pip.

This has to run in the same platform that will be using the executable, pyinstaller does not cross-build. The resulting executable can be just copied and put in the system PATH of the running machine to be able to run Conan.

Install from source

You can run Conan directly from source code. First, you need to install Python and pip.

Clone (or download and unzip) the git repository and install it.

Conan 2 is still in beta stage, so you must check the develop2 branch of the repository:

# clone folder name matters, to avoid imports issues
$ git clone https://github.com/conan-io/conan.git conan_src
$ cd conan_src
$ git fetch --all
$ git checkout -b develop2 origin/develop2
$ python -m pip install -e .

And test your conan installation:

$ conan

You should see the Conan commands help.