小编Adr*_*ift的帖子

找不到 Jupyter notebook jt 命令

我想更改 jupyter notebook 主题,所以我安装了主题:

pip install jupyterthemes
Run Code Online (Sandbox Code Playgroud)

安装似乎工作正常,但是当我尝试更改主题时:

jt -t <theme_name>
Run Code Online (Sandbox Code Playgroud)

我得到:

jt: command not found
Run Code Online (Sandbox Code Playgroud)

我试图卸载主题:

pip uninstall jupyterthemes
Run Code Online (Sandbox Code Playgroud)

但我得到了:

Skipping jupyterthemes as it is not installed
Run Code Online (Sandbox Code Playgroud)

在安装过程中我没有出错……我应该怎么做才能正确安装主题?我使用的是 Ubuntu 16.04,我用 pip 安装了 jupyter notebook。Jupyter 工作正常,只是主题不起作用

编辑:问题解决了安装 jupyterthemes:

sudo -H python3 -m pip install jupyterthemes
Run Code Online (Sandbox Code Playgroud)

现在 jt 命令被识别

python jupyter

6
推荐指数
1
解决办法
5106
查看次数

如何在从 Github 下载的 CMake 中包含 Google Mock

在 google test 的快速入门(https://google.github.io/googletest/quickstart-cmake.html)中,我找到了以下代码来从 Github 下载 google test 依赖项:

cmake_minimum_required(VERSION 3.14)
project(my_project)

# GoogleTest requires at least C++14
set(CMAKE_CXX_STANDARD 14)

include(FetchContent)
FetchContent_Declare(
  googletest
  URL https://github.com/google/googletest/archive/609281088cfefc76f9d0ce82e1ff6c30cc3591e5.zip
)

FetchContent_MakeAvailable(googletest)

enable_testing()

add_executable(
  hello_test
  hello_test.cc
)
target_link_libraries(
  hello_test
  gtest_main
)

include(GoogleTest)
gtest_discover_tests(hello_test)
Run Code Online (Sandbox Code Playgroud)

这适用于谷歌测试,并且在测试文件 hello_test.cc 中我可以#include "gtest/gtest.h"成功包含。

但是,我还想包括 Gmock:#include "gmock/gmock.h"但它找不到它。

如何包含 gmock 下载 gtest 等依赖项?

c++ cmake googletest googlemock

4
推荐指数
1
解决办法
2816
查看次数

标签 统计

c++ ×1

cmake ×1

googlemock ×1

googletest ×1

jupyter ×1

python ×1