Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/310.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何诊断柯南安装问题_Python_Installation_Conan - Fatal编程技术网

Python 如何诊断柯南安装问题

Python 如何诊断柯南安装问题,python,installation,conan,Python,Installation,Conan,我和柯南有一些安装问题 在我的Ubuntu18.04告诉我“找不到命令‘conan’后,我猜是Python 版本是错误的。所以我尝试升级,结果是 $ sudo apt-get install python python is already the newest version (2.7.15~rc1-1) 然而 $ locate python /var/lib/binfmts/python2.7 /var/lib/binfmts/python3.6 在这种状态下,我试图安装柯南 $ pip

我和柯南有一些安装问题

在我的Ubuntu18.04告诉我“找不到命令‘conan’后,我猜是Python 版本是错误的。所以我尝试升级,结果是

$ sudo apt-get install python
python is already the newest version (2.7.15~rc1-1)
然而

$ locate python
/var/lib/binfmts/python2.7
/var/lib/binfmts/python3.6
在这种状态下,我试图安装柯南

$ pip install conan
Collecting conan
...
Successfully installed Jinja2-2.10.1 MarkupSafe-1.1.1 PyJWT-1.7.1 PyYAML-5.1.2 astroid-1.6.6 attrs-19.1.0 backports.functools-lru-cache-1.5 bottle-0.12.17 certifi-2019.6.16 chardet-3.0.4 colorama-0.4.1 conan-1.18.0 configparser-3.7.4 deprecation-2.0.6 distro-1.1.0 enum34-1.1.6 fasteners-0.15 future-0.16.0 futures-3.3.0 idna-2.8 isort-4.3.21 lazy-object-proxy-1.4.1 mccabe-0.6.1 monotonic-1.5 node-semver-0.6.1 packaging-19.1 patch-1.16 pluginbase-0.7 pygments-2.4.2 pylint-1.9.5 pyparsing-2.4.2 python-dateutil-2.8.0 requests-2.22.0 singledispatch-3.4.0.3 six-1.12.0 tqdm-4.32.2 urllib3-1.25.3 wrapt-1.11.2
然后“柯南”被列为正在安装,但

$ conan

Command 'conan' not found, did you mean:
也就是说,没有错误消息或警告,只是不安装。 我发现路径没有列在我的路径中,所以我添加了“~.local/bin”。现在,故事将继续讲述错误消息

CMake Error at CMakeLists.txt:90 (include):
  include could not find load file:

    Conan
我发现 . 好的,我插入了CMakeLists.txt文件行

# Download automatically, you can also just copy the conan.cmake file

if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
   message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
   file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/master/conan.cmake"
                  "${CMAKE_BINARY_DIR}/conan.cmake")
endif()

include(${CMAKE_BINARY_DIR}/conan.cmake)

conan_cmake_run(REQUIRES Catch2/2.6.0@catchorg/stable
                BASIC_SETUP)
我也被告知,

  Please specify in command line CMAKE_BUILD_TYPE
  (-DCMAKE_BUILD_TYPE=Release)
所以我用

cmake .. -DCMAKE_BUILD_TYPE=Release
而不是

cmake ..
尽管如此,我还是收到了

ERROR: compiler not defined for compiler.libcxx
Please define compiler value first too
FATAL_ERROR;conan install command failed.
STATUS;Conan: Compiler GCC>=5, checking major version 7
STATUS;Conan: Checking correct version: 7
大约两周前,我可以在另一个系统上完美地安装相同的项目。我能回到那种状态吗?我希望柯南是稳定的,而不是阿尔法

编辑2: 我发布

答案是

Found gcc 7
gcc>=5, using the major as version

************************* WARNING: GCC OLD ABI COMPATIBILITY ***********************

Conan detected a GCC version > 5 but has adjusted the 'compiler.libcxx' setting to
'libstdc++' for backwards compatibility.
Your compiler is likely using the new CXX11 ABI by default (libstdc++11).
(我真的不知道为什么在一个新项目的情况下,我需要向后兼容)之后

cmake ..
看来终于奏效了。由于编译器标准的原因,我恐怕会有更多的问题。例如,SystemC默认为'98,但其他一些库使用的功能需要'14,而现在柯南强制使用'11。有没有一种方法可以集中处理所有这些问题,特别是针对我的系统

关于两个python版本:我没有手动安装,只有一些其他安装程序这样做。我真的不知道为什么和哪个安装脚本会导致这样的翻倍。顺便说一句:Ubuntu说V2.7是最新版本,尽管V3.x也有。我对这些版本号有点困惑。 我只是进行了一次新的安装,当python的第二个版本出现时,我并没有特别注意。我个人甚至不使用python,只有一些安装脚本可以安装它

我的制度是否具体:我不这么认为。我刚刚安装了Ubuntu 18.04.2,我的主要目标是安装这个SystemC相关的东西。我只安装了声明缺失的内容。(加上livetex、git等)

与此同时,“cmake…”终止。显然,柯南的安装工作已经结束。但是,在配置我的项目时,会显示如下消息

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
SCV_INCLUDE_DIRS
丢失的文件也由柯南使用

[requires]
SystemC/2.3.3@minres/stable
SystemCVerification/2.0.1@minres/stable
doxygen_installer/1.8.15@bincrafters/stable
qt/5.12.0@bincrafters/stable
gtest/1.8.1@bincrafters/stable
flex/2.6.4@bincrafters/stable
我使用的是完全相同的文件(要么是连接到总线的旧磁盘,要么是使用相同电缆的新磁盘)。大约一个月前进行的安装运行良好,新安装的运行情况如所述


看来安装和使用柯南对我来说太复杂了。我想简化安装,而不是使其复杂化。

这里列出了许多与安装相关的案例:

我想说柯南已经安装,但没有列在您的路径中。您可以在Python包文件夹中找到Conan,并使用Conan路径更新路径:

python -m site # list your package folder
find <package folder> -name conan
echo PATH=${PATH}:<package folder> >> ~/.bashrc
source ~/.bashrc
python-m站点#列出您的包文件夹
查找-名称:柯南
echo PATH=${PATH}:>~/.bashrc
source~/.bashrc

谢谢,我会试试的。我没想到会这样。我前几天的安装很顺利。是的,这就是问题所在。我在路径中添加了“:MyHome/.local/bin”,现在可以看到柯南了。顺便说一句:“find~-name conan”有点短。。结果在请先定义编译器值太致命_错误;conan安装命令失败。CMake/Conan处的CMake错误。CMake:44(include):include找不到加载文件:/home/jvegh/DEVEL/SCQtSimulation/build/conanbuildinfo.cmakeConan生成一个CMake文件以在CMake上下文中注入所有依赖项,工作正常,但是,Conan无法检测到编译器,这很奇怪。让我们再次尝试识别您的配置文件:
conan profile新默认值--detect--force
。此命令允许您通过CC、CXX env vars或运行诸如CC、cpp之类的命令,甚至运行gcc--version和clang--version来搜索默认编译器。我想说你的系统环境不好,没有检测到Conan和编译器。顺便说一句,我建议默认使用python3,因为有很多改进。由于系统中同时安装了python2.7和3,因此需要创建别名来设置默认版本:
echo“alias python=python3”>~/.bashrc
alias pip=pip3”>~/.bashrc
python -m site # list your package folder
find <package folder> -name conan
echo PATH=${PATH}:<package folder> >> ~/.bashrc
source ~/.bashrc