0

On installing cmake in a build file The command line prompts an error, shown in image 1 attached. After researching, it seems that the error is due to python (dependecies or filepath or any other problem). Showen below

On installing cmake and conan in a build file this is the out put command cmake -DGEN_CONAN_BUILD_INFO=ON -DCMAKE_BUILD_TYPE=Debug -DINSTALL_DEFAULT_CONF=ON -DINSTALL_EMPTY_SCHEMA_DB=ON ../

-- The CXX compiler identification is GNU 8.2.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Traceback (most recent call last):
  File "/home/A/.local/bin/conan", line 6, in <module>
    from conans.conan import run
ImportError: No module named conans.conan
CMake Error at CMakeLists.txt:7 (message):
  Failed to conan install


-- Configuring incomplete, errors occurred!
See also "/home/A/Desktop/project/build/CMakeFiles/CMakeOutput.log"

enter image description here

On reinstalling or or purging python this is the output

Reading package lists... Done
Building dependency tree      
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 gsettings-desktop-schemas : Breaks: mutter (< 3.31.4) but 3.30.2-4 is to be 
installed
 libc6-dev : Breaks: libgcc-8-dev (< 8.4.0-2~) but 8.2.0-14 is to be 
installed
             Breaks: python3.7 (< 3.7.7-1+b1) but 3.7.2-1 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by 
held packages.
Yal_12
  • 1
  • 2
  • Please add the code block instead of images if you can. – Asif Raza Jun 05 '20 at 19:02
  • 1
    Could you share your cmake file? Your output doesn't help. The best for installing Conan is using pip: https://docs.conan.io/en/latest/installation.html#install-with-pip-recommended – uilianries Jun 05 '20 at 20:28
  • 1
    @AsifRaza The coded block was added – Yal_12 Jun 06 '20 at 08:32
  • @uilianries Not sure which cmake file your looking for, I would guess it's the CMakeLists.txt? I have also installed conan using pip. – Yal_12 Jun 06 '20 at 08:32
  • The first thing to try is running Conan from the command line, and not from CMake. So the command ``conan --version`` must work from the command line. It would be necessary to know which distro you are using, how you did install Conan. Are you using a python virtualenv? this is recommended if you are using python for other things in your system. – drodri Jun 07 '20 at 21:05
  • @drodri {conan --version} works on the command line and it shows the latest version 1.25.2 . I have installed conan using pip install, but haven't used Virtualenv. – Yal_12 Jun 10 '20 at 08:11
  • @Yal_12, not sure how can it work in the command line, you copied the ``On reinstalling or or purging python this is the output``, which seems that the current installation is broken. Could you please verify that the command line works too with some other commands like ``conan install zlib/1.2.11@``? If that works, we would need more info about your CMakeLists.txt, how it is calling Conan. Does that CMakeLists.txt works in another computer? With another OS? – drodri Jun 11 '20 at 12:28
  • @drodri Many thanks, 'conan install zlib/1.2.11@' worked well! – Yal_12 Jun 14 '20 at 11:09

0 Answers0