I'm using a RPI 3B

uname -a returns: 4.14.98-v7+ #1200 armv71

OS is stretch

gcc version is 4.9.3

I'm attempting to setup my RPi to be a BLE gateway as per this project on hackster.io. I executed the first few commands:

git clone --recurse-submodules https://github.com/Wolkabout/WolkGateway.git

sudo apt-get install mosquitto cmake python python-pip && python -m pip install conan

The Bash Script

then I ran a bash script (configure.sh) that contains the following:

!/usr/bin/env bash

cp tools/git/pre-commit .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit

pushd out
conan install -s compiler.libcxx=libstdc++11 --build=missing ..
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ..

The Output of the Bash Script

the terminal outputs:

line 21: conan: command not found

line 21 is the line with conan.

Then I get a CMake error:

CMakeLists.txt:(20) (include):
include could not find load file:

Maybe Conan Isn't in My PATH

My thought was that the command conan isn't in my $PATH so I checked PIP:

pip show conan

this gave me the location of conan:


I then added that path to my $PATH:

export PATH=$PATH:/home/pi/.local/lib/python2.7/site-packages

This didn't work, causing the same error when re-running the aforementioned bash script (configure.sh)

Installing Conan From Source

I went here and installed conan from source:

 git clone https://github.com/conan-io/conan.git
 cd conan
 pip install -r conans/requirements.txt

The Python Script to Add Conan to my PATH

#!/usr/bin/env python

import sys

conan_repo_path = "/home/pi/conan" 


from conans.client.command import main

This worked. It showed me the conan commands help output.

What is this python script doing differently then when I execute configure.sh (bash script)?

  • 1
    @Rui F Ribeiro did you down vote my question, if so, please provide the reason so I know for next time.
    – Niko_Jako
    Commented Apr 5, 2019 at 16:44
  • You're referring to two different paths in your shell script and your Python script. If you do export PATH=$PATH:/home/pi/conan, does the shell script work then?
    – Haxiel
    Commented Apr 5, 2019 at 17:15
  • @Haxiel - Thanks for the help but the output of the bash script still say conan:command not found.
    – Niko_Jako
    Commented Apr 5, 2019 at 18:06

2 Answers 2


On ubuntu 18.04, after installation of the software performing pip3 install --user conan or pip install --user conan

Doesn't properly link the binary into your path. You could set the path usually because --user installs it into ~/.local/ (on a per user basis) because installing with sudo globally breaks things.

One quick option is to merely create the symlink by performing sudo ln -s ~/.local/bin/conan /usr/bin/conan

it's a small work around, however you could also add ~/.local/bin as such: export PATH=$PATH:/home/<user>/.local/bin

and you will also be able to execute any installed binaries from here as well.

  • I don't see why my answer wasn't the accepted answer, while it has 3 upvotes, and the accepted answer has 0 upvotes.
    – Rob
    Commented Sep 9, 2020 at 18:09

When installing conan:

sudo apt-get install mosquitto cmake python python-pip && python -m pip install conan

the later half:

python -m pip install conan

should be installed using sudo:

sudo python -m pip install conan

If this doesn't work, try uninstalling conan:

pip uninstall conan

and then reinstall:

sudo pip install conan

Currently my RPi is running the configure.sh script successfully.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .