menpo / conda-opencv Goto Github PK
View Code? Open in Web Editor NEWConda build scripts for OpenCV 2.x
License: BSD 3-Clause "New" or "Revised" License
Conda build scripts for OpenCV 2.x
License: BSD 3-Clause "New" or "Revised" License
When I run conda build conda/
, the output is:
I have also fixed the cmake version in the build file and set the WITH_FFMPEG flag.
Fixing permissions
Detected hard-coded path in binary file lib/libopencv_core.so.2.4.11
Detected hard-coded path in text file lib/pkgconfig/opencv.pc
/home/dijkstra/conda-bld/linux-64/opencv-2.4.11-py36_1.tar.bz2
updating index in: /home/dijkstra/conda-bld
updating index in: /home/dijkstra/conda-bld/noarch
updating index in: /home/dijkstra/conda-bld/linux-64
updating: opencv-2.4.11-py36_1.tar.bz2
updating index in: /home/dijkstra/conda-bld
TEST START: /home/dijkstra/conda-bld/linux-64/opencv-2.4.11-py36_1.tar.bz2
Deleting work directory, /home/dijkstra/conda-bld/opencv_1495808001567/work/opencv-2.4.11
The following NEW packages will be INSTALLED:
mkl: 2017.0.1-0
numpy: 1.12.1-py36_0
opencv: 2.4.11-py36_1 local
openssl: 1.0.2l-0
pip: 9.0.1-py36_1
python: 3.6.1-2
readline: 6.2-2
setuptools: 27.2.0-py36_0
sqlite: 3.13.0-0
tk: 8.5.18-0
wheel: 0.29.0-py36_0
xz: 5.2.2-1
zlib: 1.2.8-3
+ source /home/dijkstra/anaconda3/bin/activate /home/dijkstra/conda-bld/opencv_1495808001567/_t_env
+ /home/dijkstra/conda-bld/opencv_1495808001567/_t_env/bin/python -s /home/dijkstra/conda-bld/opencv_1495808001567/test_tmp/run_test.py
import: 'cv2'
Traceback (most recent call last):
File "/home/dijkstra/conda-bld/opencv_1495808001567/test_tmp/run_test.py", line 2, in <module>
import cv2
ModuleNotFoundError: No module named 'cv2'
TESTS FAILED: opencv-2.4.11-py36_1.tar.bz2
conda list
gives me:
# packages in environment at /home/dijkstra/.conda/envs/fly:
#
bzip2 1.0.6 3
cmake 3.6.3 0
curl 7.52.1 0
expat 2.1.0 0
ffmpeg 3.1.3 0 menpo
mkl 2017.0.1 0 anaconda
ncurses 5.9 10
numpy 1.12.1 py27_0 anaconda
opencv 2.4.11 py36_1 home/dijkstra/conda-bld/broken
openssl 1.0.2l 0
pip 9.0.1 py27_1
python 2.7.13 0
readline 6.2 2
setuptools 27.2.0 py27_0
sqlite 3.13.0 0
tk 8.5.18 0
wheel 0.29.0 py27_0
xz 5.2.2 1
zlib 1.2.8 3
conda install opencv-2.4.11-py36_1.tar.bz2
gives no output and I am not able to import cv2 after that also.
Hi
i create version with ffmpeg
TEST START: opencv-2.4.13-py27_1
updating index in: /home/rustam/anaconda2/conda-bld/linux-64
updating index in: /home/rustam/anaconda2/conda-bld/noarch
The following packages will be downloaded:
package | build
---------------------------|-----------------
opencv-2.4.13 | py27_1 8.6 MB local
The following NEW packages will be INSTALLED:
mkl: 11.3.3-0
numpy: 1.11.2-py27_0
opencv: 2.4.13-py27_1 local
openssl: 1.0.2j-0
pip: 9.0.1-py27_1
python: 2.7.13-0
readline: 6.2-2
setuptools: 27.2.0-py27_0
sqlite: 3.13.0-0
tk: 8.5.18-0
wheel: 0.29.0-py27_0
zlib: 1.2.8-3
+ source /home/rustam/anaconda2/bin/activate /home/rustam/anaconda2/conda-bld/conda_1483411119563/_t_env
+ /home/rustam/anaconda2/conda-bld/conda_1483411119563/_t_env/bin/python -s /home/rustam/anaconda2/conda-bld/conda_1483411119563/test_tmp/run_test.py
===== testing package: opencv-2.4.13-py27_1 =====
import: u'cv2'
Traceback (most recent call last):
File "/home/rustam/anaconda2/conda-bld/conda_1483411119563/test_tmp/run_test.py", line 27, in <module>
import cv2
ImportError: No module named cv2
TESTS FAILED: opencv-2.4.13-py27_1
ffmpeg -V
ffmpeg version 3.2.2-1~16.04.york2 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 6.2.1 (Ubuntu 6.2.1-7ubuntu1~16.04.york0) 20161215
my fork https://github.com/fortunto2/conda-opencv to build
why No module named cv2?
General configuration for OpenCV 2.4.13 =====================================
-- Version control: unknown
--
-- Platform:
-- Host: Linux 4.4.0-57-generic x86_64
-- CMake: 3.6.3
-- CMake generator: Unix Makefiles
-- CMake build tool: /usr/bin/make
-- Configuration: Release
--
-- C/C++:
-- Built as dynamic libs?: YES
-- C++ Compiler: /usr/bin/c++ (ver 5.4.0)
-- C++ flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-array-bounds -Wno-aggressive-loop-optimizations -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fopenmp -O3 -DNDEBUG -DNDEBUG
-- C++ flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-array-bounds -Wno-aggressive-loop-optimizations -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fopenmp -g -O0 -DDEBUG -D_DEBUG
-- C Compiler: /usr/bin/cc
-- C flags (Release): -I/home/rustam/anaconda2/conda-bld/conda_1483411797337/_b_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/include -fPIC -m64 -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -Wno-array-bounds -Wno-aggressive-loop-optimizations -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fopenmp -O3 -DNDEBUG -DNDEBUG
-- C flags (Debug): -I/home/rustam/anaconda2/conda-bld/conda_1483411797337/_b_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/include -fPIC -m64 -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -Wno-array-bounds -Wno-aggressive-loop-optimizations -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -fopenmp -g -O0 -DDEBUG -D_DEBUG
-- Linker flags (Release): -L/home/rustam/anaconda2/conda-bld/conda_1483411797337/_b_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/lib
-- Linker flags (Debug): -L/home/rustam/anaconda2/conda-bld/conda_1483411797337/_b_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/lib
-- Precompiled headers: YES
--
-- OpenCV modules:
-- To be built: core flann imgproc highgui features2d calib3d ml video legacy objdetect photo gpu nonfree contrib stitching superres ts videostab
-- Disabled: world
-- Disabled by dependency: -
-- Unavailable: androidcamera dynamicuda java ocl python viz
--
-- GUI:
-- QT: NO
-- GTK+ 2.x: YES (ver 2.24.30)
-- GThread : YES (ver 2.48.1)
-- GtkGlExt: NO
-- OpenGL support: NO
-- VTK support: NO
--
-- Media I/O:
-- ZLib: build (ver 1.2.7)
-- JPEG: build (ver 62)
-- PNG: build (ver 1.5.12)
-- TIFF: build (ver 42 - 4.0.2)
-- JPEG 2000: build (ver 1.900.1)
-- OpenEXR: build (ver 1.7.1)
--
-- Video I/O:
-- DC1394 1.x: NO
-- DC1394 2.x: YES (ver 2.2.4)
-- FFMPEG: YES
-- codec: YES (ver 57.64.101)
-- format: YES (ver 57.56.100)
-- util: YES (ver 55.34.100)
-- swscale: YES (ver 4.2.100)
-- resample: NO
-- gentoo-style: YES
-- GStreamer:
-- base: YES (ver 0.10.36)
-- video: YES (ver 0.10.36)
-- app: YES (ver 0.10.36)
-- riff: YES (ver 0.10.36)
-- pbutils: YES (ver 0.10.36)
-- OpenNI: NO
-- OpenNI PrimeSensor Modules: NO
-- PvAPI: NO
-- GigEVisionSDK: NO
-- UniCap: NO
-- UniCap ucil: NO
-- V4L/V4L2: Using libv4l1 (ver 1.10.0) / libv4l2 (ver 1.10.0)
-- XIMEA: NO
-- Xine: NO
--
-- Other third-party libraries:
-- Use IPP: NO
-- Use Eigen: YES (ver 3.2.2)
-- Use TBB: NO
-- Use OpenMP: YES
-- Use GCD NO
-- Use Concurrency NO
-- Use C=: NO
-- Use Cuda: NO
-- Use OpenCL: NO
--
-- Python:
-- Interpreter: /home/rustam/anaconda2/conda-bld/conda_1483411797337/_b_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place/bin/python2.7 (ver 1.4)
--
-- Java:
-- ant: NO
-- JNI: NO
-- Java tests: NO
--
-- Tests and samples:
-- Tests: NO
-- Performance tests: NO
-- C/C++ Examples: NO
--
-- Install path: /home/rustam/anaconda2/conda-bld/conda_1483411797337/_b_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_place
--
-- cvconfig.h is in: /home/rustam/anaconda2/conda-bld/conda_1483411797337/work/opencv-2.4.13/build
-- -----------------------------------------------------------------
--
Python 2.7.12 |Anaconda custom (64-bit)| (default, Jul 2 2016, 17:42:40)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
import cv2
Traceback (most recent call last):
File "", line 1, in
ImportError: libjpeg.so.9: cannot open shared object file: No such file or directory
Hi, I'm trying to build opencv with FFMPEG but this error showed up:
dangmanhtruong@dangmanhtruong-Inspiron-5468:
/Downloads/conda-opencv-master$ ls/Downloads/conda-opencv-master$ conda build conda/
conda LICENSE README.md
dangmanhtruong@dangmanhtruong-Inspiron-5468:
Adding in variants from internal_defaults
INFO:conda_build.variants:Adding in variants from internal_defaults
Attempting to finalize metadata for opencv
INFO:conda_build.metadata:Attempting to finalize metadata for opencv
Solving environment: ...working... failedLeaving build/test directories:
Work: /home/dangmanhtruong/anaconda2/conda-bld/work
Test: /home/dangmanhtruong/anaconda2/conda-bld/test_tmp
Leaving build/test environments:
Test: source activate /home/dangmanhtruong/anaconda2/conda-bld/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac
Build: source activate /home/dangmanhtruong/anaconda2/conda-bld/_build_envTraceback (most recent call last):
File "/home/dangmanhtruong/anaconda2/bin/conda-build", line 11, in
sys.exit(main())
File "/home/dangmanhtruong/anaconda2/lib/python2.7/site-packages/conda_build/cli/main_build.py", line 413, in main
execute(sys.argv[1:])
File "/home/dangmanhtruong/anaconda2/lib/python2.7/site-packages/conda_build/cli/main_build.py", line 404, in execute
verify=args.verify)
File "/home/dangmanhtruong/anaconda2/lib/python2.7/site-packages/conda_build/api.py", line 193, in build
need_source_download=need_source_download, config=config, variants=variants)
File "/home/dangmanhtruong/anaconda2/lib/python2.7/site-packages/conda_build/build.py", line 1944, in build_tree
notest=notest,
File "/home/dangmanhtruong/anaconda2/lib/python2.7/site-packages/conda_build/build.py", line 1032, in build
output_metas = expand_outputs([(m, need_source_download, need_reparse_in_env)])
File "/home/dangmanhtruong/anaconda2/lib/python2.7/site-packages/conda_build/render.py", line 582, in expand_outputs
for (output_dict, m) in _m.get_output_metadata_set(permit_unsatisfiable_variants=False):
File "/home/dangmanhtruong/anaconda2/lib/python2.7/site-packages/conda_build/metadata.py", line 1845, in get_output_metadata_set
permit_unsatisfiable_variants=permit_unsatisfiable_variants)
File "/home/dangmanhtruong/anaconda2/lib/python2.7/site-packages/conda_build/metadata.py", line 670, in finalize_outputs_pass
fm = finalize_metadata(om, permit_unsatisfiable_variants=permit_unsatisfiable_variants)
File "/home/dangmanhtruong/anaconda2/lib/python2.7/site-packages/conda_build/render.py", line 379, in finalize_metadata
exclude_pattern)
File "/home/dangmanhtruong/anaconda2/lib/python2.7/site-packages/conda_build/render.py", line 293, in add_upstream_pins
permit_unsatisfiable_variants, exclude_pattern)
File "/home/dangmanhtruong/anaconda2/lib/python2.7/site-packages/conda_build/render.py", line 281, in _read_upstream_pin_files
permit_unsatisfiable_variants=permit_unsatisfiable_variants)
File "/home/dangmanhtruong/anaconda2/lib/python2.7/site-packages/conda_build/render.py", line 117, in get_env_dependencies
channel_urls=tuple(m.config.channel_urls))
File "/home/dangmanhtruong/anaconda2/lib/python2.7/site-packages/conda_build/environ.py", line 708, in get_install_actions
raise DependencyNeedsBuildingError(exc, subdir=subdir)
conda_build.exceptions.DependencyNeedsBuildingError: Unsatisfiable dependencies for platform linux-64: set(['cmake=3.3.0'])
Please help me, thank you very much
Trying to build with FFMPEG support for Anaconda2 on quad core Dell Inspiron 64 Bit running Windows 10. Have edited the build.sh and bld.bat files to set FFMPEG flags to 1. I did update conda and conda build plus installed cmake and git before running the 'conda build conda.' command
I don't know what needs installing to solve the unsatisfiable dependencies for win-64. The only thing I can say is the _test_env and _h_env mentioned before the traceback are not present. The win-64 folder contains some json files but they only contain "{}" with the exception of repodata.json which contains this :-
{
"info": {
"subdir": "win-64"
},
"packages": {}
}
Please can you advise.
Many Thanks.
Conda build output is as follows:-
c:\ProgramData\Anaconda2\Scripts\conda-opencv>..\conda build conda
Attempting to finalize metadata for opencv
INFO:conda_build.metadata:Attempting to finalize metadata for opencv
Leaving build/test directories:
Work: c:\ProgramData\Anaconda2\conda-bld\work
Test: c:\ProgramData\Anaconda2\conda-bld\test_tmp
Leaving build/test environments:
Test: source activate c:\ProgramData\Anaconda2\conda-bld_test_env
Build: source activate c:\ProgramData\Anaconda2\conda-bld_h_env
Traceback (most recent call last):
File "c:\ProgramData\Anaconda2\Scripts\conda-build-script.py", line 10, in
sys.exit(main())
File "c:\ProgramData\Anaconda2\lib\site-packages\conda_build\cli\main_build.py", line 388, in main
execute(sys.argv[1:])
File "c:\ProgramData\Anaconda2\lib\site-packages\conda_build\cli\main_build.py", line 379, in execute
verify=args.verify)
File "c:\ProgramData\Anaconda2\lib\site-packages\conda_build\api.py", line 187, in build
need_source_download=need_source_download, config=config, variants=variants)
File "c:\ProgramData\Anaconda2\lib\site-packages\conda_build\build.py", line 1802, in build_tree
notest=notest,
File "c:\ProgramData\Anaconda2\lib\site-packages\conda_build\build.py", line 895, in build
output_metas = expand_outputs([(m, need_source_download, need_reparse_in_env)])
File "c:\ProgramData\Anaconda2\lib\site-packages\conda_build\render.py", line 582, in expand_outputs
for (output_dict, m) in _m.get_output_metadata_set(permit_unsatisfiable_variants=False):
File "c:\ProgramData\Anaconda2\lib\site-packages\conda_build\metadata.py", line 1788, in get_output_metadata_set
permit_unsatisfiable_variants=permit_unsatisfiable_variants)
File "c:\ProgramData\Anaconda2\lib\site-packages\conda_build\metadata.py", line 648, in finalize_outputs_pass
fm = finalize_metadata(om, permit_unsatisfiable_variants=permit_unsatisfiable_variants)
File "c:\ProgramData\Anaconda2\lib\site-packages\conda_build\render.py", line 314, in finalize_metadata
permit_unsatisfiable_variants=permit_unsatisfiable_variants)
File "c:\ProgramData\Anaconda2\lib\site-packages\conda_build\render.py", line 115, in get_env_dependencies
channel_urls=tuple(m.config.channel_urls))
File "c:\ProgramData\Anaconda2\lib\site-packages\conda_build\environ.py", line 687, in get_install_actions
raise DependencyNeedsBuildingError(exc, subdir=subdir)
conda_build.exceptions.DependencyNeedsBuildingError: Unsatisfiable dependencies for platform win-64: set(['cmake 3.3.0.*'])
c:\ProgramData\Anaconda2\Scripts\conda-opencv>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.