conan-io / training

(Deprecated) Support code for conan 1.X trainings

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"conan install" doesn't work in testing environment on Ubuntu 22.04

nouvak opened this issue · comments

Hello!

When executing "conan install .." command of the "consumer" exercise in the conan-training docker container, I get the following error:

ERROR: boost/1.72.0: Cannot load recipe.
Error loading conanfile at '/home/conan/.conan/data/boost/1.72.0///export/conanfile.py': Unable to load conanfile in /home/conan/.conan/data/boost/1.72.0///export/conanfile.py
File "/opt/pyenv/versions/3.7.13/lib/python3.7/imp.py", line 171, in load_source
module = _load(spec)
File "", line 696, in _load
File "", line 677, in load_unlocked
File "", line 728, in exec_module
File "", line 219, in call_with_frames_removed
File "/home/conan/.conan/data/boost/1.72.0/
/
/export/conanfile.py", line 1, in
from conan.tools.apple import is_apple_os
ImportError: cannot import name 'is_apple_os' from 'conan.tools.apple' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conan/tools/apple/init.py)

I resolved the error by upgrading the conan package to 1.52.0 version:
pip install conan --upgrade

You might want to consider upgrading the conan version in the conan-training Docker container.

Greetings
Marko Novak

I hit this issue on windows 11. The docker is running on WSL2 and pip install conan --upgrade fixed the issue. Just leaving a comment here in case you guys forgot the merge request. This can throw off a beginner off course.

Hello, the pull request #103 should update Conan 1.52.0

commented

#103 was merged, re-building the docker should work now, thanks!