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

时间:2019-07-09 19:43:09

标签: python c++ makefile jupyter-notebook

当我运行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)

0 个答案:

没有答案