Ubuntu Server 12.04의 virtualenv 내에 OpenCV를 설치하려고합니다. a thread discussing this을 찾았지만 정보를 추출하지 못했습니다.Python virtualenv에서 OpenCV 실행
pip install pyopencv
을 사용해 보았지만 실패했습니다.
...
package/extras/core/ndarray.cpp:598:1: instantiated from here
package/extras/core/ndarray.cpp:546:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘Py_intptr_t {aka long int}’ [-Wformat]
package/extras/core/ndarray.cpp: In function ‘boost::python::api::object sdcpp::from_ndarray_impl(const sdcpp::ndarray&) [with T = cv::Scalar_<double>]’:
package/extras/core/ndarray.cpp:601:1: instantiated from here
package/extras/core/ndarray.cpp:546:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘Py_intptr_t {aka long int}’ [-Wformat]
package/extras/core/ndarray.cpp: In function ‘boost::python::api::object sdcpp::from_ndarray_impl(const sdcpp::ndarray&) [with T = cv::Range]’:
package/extras/core/ndarray.cpp:604:1: instantiated from here
package/extras/core/ndarray.cpp:546:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘Py_intptr_t {aka long int}’ [-Wformat]
error: command 'gcc' failed with exit status 1
이 오류는 pip install
을 두 번째 실행하는 경우에만 발생합니다. 내가 reminginging build/
폴더를 삭제하면 나는이 오류가 발생합니다.
-- Configuring incomplete, errors occurred!
Configuring PyOpenCV via CMake...
Error: error occurred while running CMake to configure PyOpenCV.
You may want to manually configure PyOpenCV by running cmake's tools:
mkdir build
cd build
cmake-gui .. OR cmake ..
cd ..
----------------------------------------
Command python setup.py egg_info failed with error code 255
적어도 다음 apt 패키지가 설치되어 있습니다.
build-essential
uuid-dev
python-dev
python-pip
libpq-dev
cmake
libboost-dev
libcv-dev
libcvaux-dev
libboost-python-dev
libboost1.48-dev
내 virtualenv 내에 어떻게 OpenCV를 설치할 수 있습니까?
. 나는 'pyopencv'가이 프로젝트 http://code.google.com/p/pyopencv/에 해당하고 opencv 2.X와 함께 제공되는 Python 바인딩이 아니라는 것을 알아 차렸습니다. –