2017-06-06 20 views
0

私はopenCVを83%インストールする際に問題があります...私のpythonは2.7.3です。私はxcodeをhabilitedしていた。私はこれをtuturialと使いました。open CV CVOS MacOSX

マイCMAKE:

cmake -D CMAKE_BUILD_TYPE=RELEASE \ 
    -D CMAKE_INSTALL_PREFIX=/usr/local \ 
    -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \ 
    -D PYTHON2_LIBRARIES=/usr/local/Furlan/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/libpython2.7.dylib \ 
    -D PYTHON2_INCLUDE_DIR=/usr/local/Furlan/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/include/python2.7/ \ 
    -D PYTHON2_EXECUTABLE=$VIRTUAL_ENV/bin/python \ 
    -D BUILD_opencv_python2=ON \ 
    -D BUILD_opencv_python3=OFF \ 
    -D INSTALL_PYTHON_EXAMPLES=ON \ 
    -D INSTALL_C_EXAMPLES=OFF \ 
    -D BUILD_EXAMPLES=ON .. 

マイログ:

MBP-de-Augusto:build Furlan$ sudo make && sudo make install 

[ 66%] Built target example_structured_light_capsinpattern 
[ 66%] Linking CXX executable ../../bin/opencv_test_structured_light 
[ 66%] Built target opencv_test_structured_light 
[ 66%] Linking CXX executable ../../bin/example_structured_light_cap_pattern 
[ 66%] Built target example_structured_light_cap_pattern 
[ 66%] Linking CXX executable ../../bin/example_structured_light_projectorcalibration 
[ 66%] Built target example_structured_light_projectorcalibration 
[ 66%] Linking CXX shared library ../../lib/libopencv_tracking.dylib 
[ 67%] Built target opencv_tracking 
[ 67%] Linking CXX executable ../../bin/example_tracking_tutorial_introduction_to_tracker 
[ 67%] Built target example_tracking_tutorial_introduction_to_tracker 
[ 67%] Linking CXX executable ../../bin/example_tracking_tracker 
[ 67%] Built target example_tracking_tracker 
[ 67%] Linking CXX executable ../../bin/example_tracking_tracker_dataset 
[ 67%] Built target example_tracking_tracker_dataset 
[ 67%] Linking CXX executable ../../bin/example_tracking_multiTracker_dataset 
[ 67%] Built target example_tracking_multiTracker_dataset 
[ 67%] Linking CXX executable ../../bin/example_tracking_tutorial_multitracker 
[ 67%] Built target example_tracking_tutorial_multitracker 
[ 67%] Linking CXX executable ../../bin/example_tracking_benchmark 
[ 67%] Built target example_tracking_benchmark 
[ 67%] Linking CXX executable ../../bin/example_tracking_multitracker 
[ 67%] Built target example_tracking_multitracker 
[ 67%] Linking CXX executable ../../bin/example_tracking_kcf 
[ 67%] Built target example_tracking_kcf 
[ 67%] Linking CXX executable ../../bin/opencv_test_tracking 
[ 67%] Built target opencv_test_tracking 
[ 67%] Linking CXX executable ../../bin/example_tracking_tutorial_customizing_cn_tracker 
[ 67%] Built target example_tracking_tutorial_customizing_cn_tracker 
[ 67%] Linking CXX executable ../../bin/example_tracking_goturnTracker 
[ 67%] Built target example_tracking_goturnTracker 
[ 67%] Linking CXX executable ../../bin/opencv_perf_tracking 
[ 67%] Built target opencv_perf_tracking 
[ 67%] Linking CXX shared library ../../lib/libopencv_videostab.dylib 
[ 68%] Built target opencv_videostab 
[ 68%] Linking CXX shared library ../../lib/libopencv_xfeatures2d.dylib 
[ 69%] Built target opencv_xfeatures2d 
[ 70%] Linking CXX executable ../../bin/example_xfeatures2d_pct_signatures 
[ 70%] Built target example_xfeatures2d_pct_signatures 
[ 70%] Linking CXX executable ../../bin/example_xfeatures2d_pct_webcam 
[ 70%] Built target example_xfeatures2d_pct_webcam 
[ 70%] Linking CXX executable ../../bin/opencv_perf_xfeatures2d 
[ 70%] Built target opencv_perf_xfeatures2d 
[ 70%] Linking CXX executable ../../bin/example_xfeatures2d_video_homography 
[ 70%] Built target example_xfeatures2d_video_homography 
[ 70%] Linking CXX executable ../../bin/example_xfeatures2d_surf_matcher 
[ 70%] Built target example_xfeatures2d_surf_matcher 
[ 70%] Linking CXX executable ../../bin/example_xfeatures2d_shape_transformation 
[ 70%] Built target example_xfeatures2d_shape_transformation 
[ 70%] Linking CXX executable ../../bin/opencv_test_xfeatures2d 
[ 70%] Built target opencv_test_xfeatures2d 
[ 70%] Linking CXX executable ../../bin/example_xfeatures2d_bagofwords_classification 
[ 70%] Built target example_xfeatures2d_bagofwords_classification 
[ 70%] Linking CXX shared library ../../lib/libopencv_ximgproc.dylib 
[ 72%] Built target opencv_ximgproc 
[ 72%] Linking CXX executable ../../bin/example_ximgproc_thinning 
[ 72%] Built target example_ximgproc_thinning 
[ 72%] Linking CXX executable ../../bin/example_ximgproc_seeds 
[ 72%] Built target example_ximgproc_seeds 
[ 72%] Linking CXX executable ../../bin/example_ximgproc_niblack_thresholding 
[ 72%] Built target example_ximgproc_niblack_thresholding 
[ 72%] Linking CXX executable ../../bin/example_ximgproc_selectivesearchsegmentation_demo 
[ 72%] Built target example_ximgproc_selectivesearchsegmentation_demo 
[ 72%] Linking CXX executable ../../bin/example_ximgproc_structured_edge_detection 
[ 72%] Built target example_ximgproc_structured_edge_detection 
[ 72%] Linking CXX executable ../../bin/example_ximgproc_graphsegmentation_demo 
[ 72%] Built target example_ximgproc_graphsegmentation_demo 
[ 72%] Linking CXX executable ../../bin/example_ximgproc_slic 
[ 72%] Built target example_ximgproc_slic 
[ 72%] Linking CXX executable ../../bin/example_ximgproc_fld_lines 
[ 72%] Built target example_ximgproc_fld_lines 
[ 72%] Linking CXX executable ../../bin/opencv_perf_ximgproc 
[ 73%] Built target opencv_perf_ximgproc 
[ 73%] Linking CXX executable ../../bin/example_ximgproc_filterdemo 
[ 73%] Built target example_ximgproc_filterdemo 
[ 73%] Linking CXX executable ../../bin/example_ximgproc_disparity_filtering 
[ 73%] Built target example_ximgproc_disparity_filtering 
[ 73%] Linking CXX executable ../../bin/example_ximgproc_fast_hough_transform 
[ 73%] Built target example_ximgproc_fast_hough_transform 
[ 73%] Linking CXX executable ../../bin/opencv_test_ximgproc 
[ 74%] Built target opencv_test_ximgproc 
[ 74%] Linking CXX executable ../../bin/example_ximgproc_live_demo 
[ 75%] Built target example_ximgproc_live_demo 
[ 75%] Linking CXX executable ../../bin/example_ximgproc_paillou_demo 
[ 75%] Built target example_ximgproc_paillou_demo 
[ 75%] Linking CXX executable ../../bin/example_ximgproc_deriche_demo 
[ 75%] Built target example_ximgproc_deriche_demo 
[ 75%] Linking CXX shared library ../../lib/libopencv_aruco.dylib 
[ 75%] Built target opencv_aruco 
[ 75%] Linking CXX executable ../../bin/example_aruco_detect_markers 
[ 75%] Built target example_aruco_detect_markers 
[ 75%] Linking CXX executable ../../bin/opencv_test_aruco 
[ 75%] Built target opencv_test_aruco 
[ 75%] Linking CXX executable ../../bin/example_aruco_detect_diamonds 
[ 75%] Built target example_aruco_detect_diamonds 
[ 75%] Linking CXX executable ../../bin/example_aruco_detect_board 
[ 75%] Built target example_aruco_detect_board 
[ 75%] Linking CXX executable ../../bin/example_aruco_create_marker 
[ 75%] Built target example_aruco_create_marker 
[ 75%] Linking CXX executable ../../bin/example_aruco_create_board 
[ 75%] Built target example_aruco_create_board 
[ 75%] Linking CXX executable ../../bin/example_aruco_calibrate_camera 
[ 75%] Built target example_aruco_calibrate_camera 
[ 75%] Linking CXX executable ../../bin/example_aruco_create_diamond 
[ 75%] Built target example_aruco_create_diamond 
[ 75%] Linking CXX executable ../../bin/example_aruco_calibrate_camera_charuco 
[ 75%] Built target example_aruco_calibrate_camera_charuco 
[ 75%] Linking CXX executable ../../bin/example_aruco_detect_board_charuco 
[ 75%] Built target example_aruco_detect_board_charuco 
[ 75%] Linking CXX executable ../../bin/example_aruco_create_board_charuco 
[ 76%] Built target example_aruco_create_board_charuco 
[ 76%] Linking CXX shared library ../../lib/libopencv_optflow.dylib 
[ 77%] Built target opencv_optflow 
[ 77%] Linking CXX executable ../../bin/example_optflow_gpc_evaluate 
[ 77%] Built target example_optflow_gpc_evaluate 
[ 77%] Linking CXX executable ../../bin/example_optflow_pcaflow_demo 
[ 78%] Built target example_optflow_pcaflow_demo 
[ 78%] Linking CXX executable ../../bin/example_optflow_gpc_train 
[ 78%] Built target example_optflow_gpc_train 
[ 78%] Linking CXX executable ../../bin/example_optflow_optical_flow_evaluation 
[ 78%] Built target example_optflow_optical_flow_evaluation 
[ 78%] Linking CXX executable ../../bin/opencv_perf_optflow 
[ 78%] Built target opencv_perf_optflow 
[ 78%] Linking CXX executable ../../bin/example_optflow_simpleflow_demo 
[ 78%] Built target example_optflow_simpleflow_demo 
[ 78%] Linking CXX executable ../../bin/opencv_test_optflow 
[ 78%] Built target opencv_test_optflow 
[ 78%] Linking CXX executable ../../bin/example_optflow_motempl 
[ 78%] Built target example_optflow_motempl 
[ 78%] Linking CXX executable ../../bin/example_optflow_dis_opticalflow 
[ 78%] Built target example_optflow_dis_opticalflow 
[ 78%] Linking CXX shared library ../../lib/libopencv_stitching.dylib 
[ 79%] Built target opencv_stitching 
[ 79%] Linking CXX executable ../../bin/opencv_test_stitching 
[ 79%] Built target opencv_test_stitching 
[ 79%] Linking CXX executable ../../bin/opencv_perf_stitching 
[ 80%] Built target opencv_perf_stitching 
[ 80%] Generating pyopencv_generated_include.h, pyopencv_generated_funcs.h, pyopencv_generated_types.h, pyopencv_generated_type_reg.h, pyopencv_generated_ns_reg.h 
/bin/sh: /bin/python: No such file or directory 
make[2]: *** [modules/python2/pyopencv_generated_include.h] Error 127 
make[1]: *** [modules/python2/CMakeFiles/opencv_python2.dir/all] Error 2 
make: *** [all] Error 2 

答えて

1

私は、同様のエラーが発生しました。 、そのファイルのgen2.py

検索のようなものをそれはそれは、Pythonスクリプトを使用していますpyopencv_generated_include.h, pyopencv_generated_funcs.h, pyopencv_generated_types.h, pyopencv_generated_type_reg.h, pyopencv_generated_ns_reg.h

を生成しようとする行を検索opencv/build/modules/python2/CMakeFiles/opencv_python2.dir/

でbuild.makeファイルが存在しなければなりません。たとえば、私の場合、それはに位置していたopencv/modules/python/src2

最初の行をチェックして、あなたのpythonの実行可能パスがあることを確認してください

関連する問題