Open Coopergd1 opened 5 years ago
How about adding the path to your Python to the environment variable?
e.g.
> set Path=<path to the folder containing Python executable>;%Path%
> build_win.cmd
I have this same issue, is there a solution yet?
Using: sudo apt-get install python2-dev fixed it for me
I am attempting to compile and run caffe on Windows, I had been able to compile on a different machine last year running Ubuntu and did not have any problems. Now on Windows I am having a problem, the problem is in the title of this question. When running the build_win.cmd command, I have an error where Numpy and PythonLibs are not found. I tried to add a direct link to numpy in the build_win.cmd file (editing with Notepad++). All other dependencies are found as far as I can tell.
I have attempted to compile both in and out of an Anaconda virtual environment, the same error occurs both times. I have attempted to uninstall and reinstall NumPy as well as Anaconda. I am able to import and use numpy when I run python in and out of the virtual environment.
I was not able to find a solution on and forums that I checked on Google or Bing. I was able to find some people who had the same problem on Chinese forums when I checked Baidu, but was not able to find a solution. Please find the output below. Any help or leads will be greatly appreciated! Thank you for your time,
I am running Windows 10, CUDA 9, cuDNN 7.4, Python 3.5, VS 2015
Please find related output below;
The system cannot find the drive specified. The system cannot find the drive specified. INFO: ============================================================ INFO: Summary: INFO: ============================================================ INFO: MSVC_VERSION = 14 INFO: WITH_NINJA = 0 INFO: CMAKE_GENERATOR = "Visual Studio 14 2015 Win64" INFO: CPU_ONLY = 0 INFO: CUDA_ARCH_NAME = Auto INFO: CMAKE_CONFIG = Release INFO: USE_NCCL = 0 INFO: CMAKE_BUILD_SHARED_LIBS = 0 INFO: PYTHON_VERSION = 3 INFO: BUILD_PYTHON = 1 INFO: BUILD_PYTHON_LAYER = 1 INFO: BUILD_MATLAB = 0 INFO: PYTHON_EXE = "python" INFO: RUN_TESTS = 0 INFO: RUN_LINT = 0 INFO: RUN_INSTALL = 0 INFO: ============================================================ -- Selecting Windows SDK version to target Windows 10.0.17134. -- Boost version: 1.61.0 -- Found the following Boost libraries: -- system -- thread -- filesystem -- chrono -- date_time -- atomic -- Found gflags (include: C:/Users/d/.caffe/dependencies/libraries_v140_x64_py27_1.1.0/libraries/include, library: gflags_shared) -- Found glog (include: C:/Users/d/.caffe/dependencies/libraries_v140_x64_py27_1.1.0/libraries/include, library: glog) -- Found PROTOBUF Compiler: C:/Users/d/.caffe/dependencies/libraries_v140_x64_py27_1.1.0/libraries/bin/protoc.exe -- Found lmdb (include: C:/Users/d/.caffe/dependencies/libraries_v140_x64_py27_1.1.0/libraries/include, library: lmdb) -- Found LevelDB (include: C:/Users/d/.caffe/dependencies/libraries_v140_x64_py27_1.1.0/libraries/include, library: leveldb) -- Found Snappy (include: C:/Users/d/.caffe/dependencies/libraries_v140_x64_py27_1.1.0/libraries/include, library: snappy_static;optimized;C:/Users/d/.caffe/dependencies/libraries_v140_x64_py27_1.1.0/libraries/lib/caffezlib.lib;debug;C:/Users/d/.caffe/dependencies/libraries_v140_x64_py27_1.1.0/libraries/lib/caffezlibd.lib) -- CUDA detected: 9.0 -- Found cuDNN: ver. 7.4.1 found (include: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.0/include, library: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.0/lib/x64/cudnn.lib) -- Added CUDA NVCC flags for: sm_61 -- OpenCV found (C:/Users/d/.caffe/dependencies/libraries_v140_x64_py27_1.1.0/libraries) -- Found OpenBLAS libraries: C:/Users/d/.caffe/dependencies/libraries_v140_x64_py27_1.1.0/libraries/lib/libopenblas.dll.a -- Found OpenBLAS include: C:/Users/d/.caffe/dependencies/libraries_v140_x64_py27_1.1.0/libraries/include -- Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is at least version "2.7") Traceback (most recent call last): File "", line 1, in
ImportError: No module named numpy
-- Could NOT find NumPy (missing: NUMPY_INCLUDE_DIR NUMPY_VERSION) (Required is at least version "1.7.1")
-- Boost version: 1.61.0
-- Found the following Boost libraries:
-- python
-- Python interface is disabled or not all required dependencies found. Building without it...
-- Caffe Configuration Summary -- General: -- Version : 1.0.0 -- Git : 1.0-111-g509dae05-dirty -- System : Windows -- C++ compiler : C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- Release CXX flags : /MD /O2 /Ob2 /DNDEBUG /DWIN32 /D_WINDOWS /W3 /GR /EHsc -- Debug CXX flags : /MDd /Zi /Ob0 /Od /RTC1 /DWIN32 /D_WINDOWS /W3 /GR /EHsc -- Build type : Release
-- BUILD_SHARED_LIBS : 0 -- BUILD_python : 1 -- BUILD_matlab : 0 -- BUILD_docs : -- CPU_ONLY : 0 -- USE_OPENCV : ON -- USE_LEVELDB : ON -- USE_LMDB : ON -- USE_NCCL : 0 -- ALLOW_LMDB_NOLOCK : OFF
-- Dependencies: -- BLAS : Yes (Open) -- Boost : Yes (ver. 1.61) -- glog : Yes -- gflags : Yes -- protobuf : Yes (ver. 3.1.0) -- lmdb : Yes (ver. 0.9.70) -- LevelDB : Yes (ver. 1.18) -- Snappy : Yes (ver. 1.1.1) -- OpenCV : Yes (ver. 3.1.0) -- CUDA : Yes (ver. 9.0)
-- NVIDIA CUDA: -- Target GPU(s) : Auto -- GPU arch(s) : sm_61 -- cuDNN : Yes (ver. 7.4.1)
-- Install: -- Install path : C:/Projects/caffe/scripts/build/install
-- Configuring done CMake Error at CMakeLists.txt:143 (add_dependencies): The dependency target "pycaffe" of target "pytest" does not exist.
-- Generating done -- Build files have been written to: C:/Projects/caffe/scripts/build ERROR: Configure failed