Skip to content

Restrict Python Conan Version in Docker Contianer

I recently rebuild the containerized version of openpass and ran into issues with conan not recognizing the "profile new" command:

usage: conan profile [-h] [-v [V]] {detect,list,path,show} ...
conan profile: error: argument subcommand: invalid choice: 'new' (choose from 'detect', 'list', 'path', 'show')
ERROR: Exiting with code: 2
usage: conan profile [-h] [-v [V]] {detect,list,path,show} ...
conan profile: error: argument subcommand: invalid choice: 'update' (choose from 'detect', 'list', 'path', 'show')
ERROR: Exiting with code: 2
usage: conan export [-h] [-f FORMAT] [-v [V]] [--name NAME]
                    [--version VERSION] [--user USER] [--channel CHANNEL]
                    [-r REMOTE | -nr] [-l LOCKFILE]
                    [--lockfile-out LOCKFILE_OUT] [--lockfile-partial]
                    [--build-require]
                    path

Called in https://gitlab.eclipse.org/eclipse/openpass/opSimulation/-/blob/193-problems-with-worldosi/utils/ci/scripts/15_prepare_thirdParty.sh#L36.

How to fix: Restrict https://gitlab.eclipse.org/eclipse/openpass/opSimulation/-/blob/193-problems-with-worldosi/utils/Dockerfile#L40 by replacing it with: "conan>=1.0,<2.0"

Now build works fine again.