如何修复“ / bin / sh:bc:找不到命令”

问题描述 投票:1回答:1

当我运行Jupyter Notebook的脚本!make时,出现此错误:

/ bin / sh:bc:找不到命令

但是我的Makefile中没有使用“ bc”功能。

我在Windows 10笔记本电脑上安装了Python3,MinGW(包含MSYS),GNUWin32和OpenMPI。

  1. 所以我试图自己安装“ bc”。第一:!pip install bc

安装已经进行了一段时间。之后,我得到:

!bc

已经满足要求:c:\ users \ USERNAME \ anaconda3 \ lib \ site-packages(0.0.1)中的密件抄送

  1. 我还为Windows(http://gnuwin32.sourceforge.net/packages/bc.htm)下载了“ bc-1.06-2.exe”并安装它。该文件安装在文件夹“ mingw-w64 / GnuWin32”下(自动),并且“ mingw-w64 / GnuWin32 / bin”中存在“ bc.exe”。

但是两次尝试都没有用。

任何想法,我可以怎么解决?谢谢。

我在这里附加了我的Makefile:

# Please install kokkos in the following directory
# This directory has the same name as the kokkos repository,
# So please change your path to match this line so 
# all MOLTN users can have a consistent setup
KOKKOS_PATH = ${HOME}/kokkos

# Declares which type of parallism we are using
KOKKOS_DEVICES = "Serial"
EXE_NAME = "moltn_kokkos"

# Define the source files as our desired application plus all cpp files in the library
SRC = examples/advection.cpp $(wildcard library/*.cpp)
# Define the header files as our desired application plus all hpp files in the library
HDR = $(wildcard library/*.hpp)

default: build
    echo "Start Build" 

CXX = mpic++
CXXFLAGS = -O3 -DENABLE_MPI
EXE = ${EXE_NAME}.host
KOKKOS_ARCH = "BDW"

# Safe mode

override CXXFLAGS += -I./
LINK = ${CXX}
LINKFLAGS =

DEPFLAGS = -M

vpath %.cpp $(sort $(dir $(SRC)))

OBJ = $(notdir $(SRC:.cpp=.o))
LIB =

include $(KOKKOS_PATH)/Makefile.kokkos

$(warning $(OBJ) $(EXE) $(sort $(dir $(SRC))))

build: $(EXE)

$(EXE): $(OBJ) $(KOKKOS_LINK_DEPENDS) 
    $(LINK) $(KOKKOS_LDFLAGS) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(KOKKOS_LIBS) $(LIB) -o $(EXE)

clean: kokkos-clean
    echo "$(KOKKOS_DEVICES) $(KOKKOS_PATH) $(KOKKOS_CXXFLAGS)"
    rm -f *.o *.cuda *.host *.a *.h *.tmp *.x

# Compilation rules

%.o:%.cpp $(KOKKOS_CPP_DEPENDS) $(HDR)
    echo "$(KOKKOS_DEVICES) $(KOKKOS_PATH) $(KOKKOS_CXXFLAGS)"
    $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $< -o $(notdir $@)

test: $(EXE)
    ./$(EXE)
python c++ makefile jupyter-notebook
1个回答
0
投票

在这里搜索,对我来说效果很好:https://www.howtoinstall.co/en/debian/jessie/bc

© www.soinside.com 2019 - 2024. All rights reserved.