I am doing an installation of Space Veins. And when I run $ make conan_deps as per the Installation instructions, I get the following error.
The version of space veins is 0.2. Other software versions are as follows Ubuntu 20.04 Veins 5.1 OMNeT++ 5.6.2 SUMO 1.8.0 Conan 1.42.1 (A C/C++ package manager required to install PROJ 8.1.1)
keita@keita:~/space_veins-space_Veins-0.2$ make conan_deps mkdir build && cd build && conan install --build=proj .. Configuration: [settings] arch=x86_64 arch_build=x86_64 build_type=Release compiler=gcc compiler.libcxx=libstdc++11 compiler.version=9 os=Linux os_build=Linux [options] [build_requires] [env]
ERROR: proj/8.1.1: Cannot load recipe. Error loading conanfile at '/home/keita/.conan/data/proj/8.1.1///export/conanfile.py': Unable to load conanfile in /home/keita/.conan/data/proj/8.1.1///export/conanfile.py File "/usr/lib/python3.8/imp.py", line 171, in load_source module = _load(spec) File "", line 702, in _load File "", line 671, in load_unlocked File "", line 848, in exec_module File "", line 219, in call_with_frames_removed File "/home/keita/.conan/data/proj/8.1.1///export/conanfile.py", line 1, in from conan import ConanFile ImportError: cannot import name 'ConanFile' from 'conan' (/home/keita/conan-1.42.1/conan/init.py)
make: *** [Makefile:25: conan_deps] error 1
The key is this line in the error:
It means that the conanfile.py of the package being read contains a
from conan import ConanFile
. Thefrom conan
is Conan 1.X modernized version of the lagacyfrom conans
. It has been available for a while in Conan 1.X version, if your current Conan version is too old, and it looks like it is, it will not be able to load that dependencyconanfile.py
.TLDR: The Conan client version seems too old to load a modern recipe.