I am installing opencv 3.1.0 with extra modules and I need to install sfm module. I installed all the prerequisites as stated in the installation guide in sfm package, and ran this command from opencv_source_directory/release:
cmake -DOPENCV_EXTRA_MODULES_PATH=~/git/opencv_contrib/modules ..
I can successfully create make file and install.
But I cannot find sfm.hpp under installation_path/include/opencv2/
Is there anything I missed? Thanks!
I found these in CMake command line output:
-- Found required Ceres dependency: Eigen version 3.2.8 in /usr/local/include/eigen3
-- Found required Ceres dependency: Glog in /usr/include
-- Found Ceres version: 1.12.0 installed in: /usr/local
-- Module opencv_sfm disabled because the following dependencies are not found: Glog/Gflags
But I did installed Glog/Gflags:
~$ sudo apt-get install libeigen3-dev libgflags-dev libgoogle-glog-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libgflags-dev is already the newest version.
libgoogle-glog-dev is already the newest version.
libeigen3-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Could anyone help? Thanks!
Problem is solved. Just remember to clear all the cmake cache files (remove the whole build folder) before running cmake again.
Related
Please how should i install psycopg2-binary on my python image.
I tried pip install psycopg2-binary==2.8.2 but i got this error
ERROR: Could not find a version that satisfies the requirement psycopg2-binary==2.8.2 (from versions: 2.7.4, 2.7.5, 2.7.6, 2.7.6.1, 2.7.7, 2.8, 2.8.1, 2.8.2, 2.8.3, 2.8.4, 2.8.5, 2.8.6, 2.9, 2.9.1) ERROR: No matching distribution found for psycopg2-binary==2.8.2
My image is python3.9-alpine
What should i do please???
Given the amount of work that requires to be done, I suggest you use a different base image, e.g. python:3.9 or that you install the alpine package py3-psycopg2 (which is on v 2.8.6 at the time of writing).
Anyway I tried it on my machine and in the error it's also written Error: pg_config executable not found.
The pg_config is part of the postgres_dev package and needs to be installed before installing the psycopg2-binary package.
The psycopg2-binary will also need the gcc to be installed and some other libraries.
In other words, you have to execute the following commands:
apk add postgresql-dev gcc ...
pip install psycopg2-binary==2.8.2
I've abandoned the topic after I had to install a bunch of libraries.
Error message:
$ pip3 install opencv-contrib-python
ERROR: Could not find a version that satisfies the requirement opencv-contrib-python (from versions: none)
ERROR: No matching distribution found for opencv-contrib-python
Check the answer here.
You have to download source code from https://github.com/skvark/opencv-python, install compiler and necessary libraries and compile OpenCV yourself.
I just installed Homebrew on Lion 10.7.5 (it did complain that it is not supported, so I am aware that this may be the reason). I tried to install pandoc, and apparently cryptonite is causing problems.
~ $ brew install pandoc
Warning: You are using macOS 10.7.
We (and Apple) do not provide support for this old version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.
==> Using the sandbox
==> Downloading https://hackage.haskell.org/package/pandoc-1.18/pandoc-1.18.tar.
Already downloaded: /Users/username/Library/Caches/Homebrew/pandoc-1.18.tar.gz
==> cabal sandbox init
==> cabal update
==> cabal install --jobs=4 --max-backjumps=100000 --only-dependencies --constrai
Last 15 lines from /Users/username/Library/Logs/Homebrew/pandoc/03.cabal:
Installed pandoc-types-1.17.0.4
Downloading texmath-0.8.6.7...
Configuring texmath-0.8.6.7...
Building texmath-0.8.6.7...
Installed texmath-0.8.6.7
cabal: Error: some packages failed to install:
connection-0.2.6 depends on cryptonite-0.20 which failed to install.
cryptonite-0.20 failed during the building phase. The exception was:
ExitFailure 1
http-client-tls-0.3.3 depends on cryptonite-0.20 which failed to install.
tls-1.3.8 depends on cryptonite-0.20 which failed to install.
x509-1.6.4 depends on cryptonite-0.20 which failed to install.
x509-store-1.6.2 depends on cryptonite-0.20 which failed to install.
x509-system-1.6.4 depends on cryptonite-0.20 which failed to install.
x509-validation-1.6.5 depends on cryptonite-0.20 which failed to install.
READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
https://github.com/Homebrew/homebrew-core/issues
Warning: You are using macOS 10.7.
We (and Apple) do not provide support for this old version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.
I hope I can install pandoc on 10.7.5. This is a MBP early 2011 with 4 GB RAM. Newer versions run very slowly, so I'd prefer not to upgrade from Lion, unless I have to.
UPDATE: I ended up upgrading to Mavericks. Everything worked just fine (some hiccups, nothing major). Homebrew installed fine, then pandoc was installed with Homebrew and now everything is humming.
Inspired by https://discourse.brew.sh/t/how-to-install-old-version-of-a-formula, I found a workaround.
As Homebrew doesn't offer Pandoc < 2.0 anymore, we need to sneak it into the current formula like so:
$ cd "$(brew --repo homebrew/core)"
In Formula/pandoc.rb, replace the contents of url with https://hackage.haskell.org/package/pandoc-1.19.2.4/pandoc-1.19.2.4.tar.gz and the contents of sha256 with bbe08c1f7fcfea98b899f9956c04159d493a26f65d3350aa6579aa5b93203556
Now you can install Pandoc: $ brew install pandoc.
while installing the following command I get the error as shown below
parag#parag:~/torch-hdf5$ sudo luarocks make hdf5-0-0.rockspec LIBHDF5_LIBDIR="/usr/lib/x86_64-linux-gnu/"
Missing dependencies for hdf5:
totem
Error: Could not satisfy dependency: totem
Totem is already installed.
parag#parag:~$ sudo apt-get install totem
[sudo] password for parag:
Reading package lists... Done
Building dependency tree
Reading state information... Done
totem is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 102 not upgraded.
parag#parag:~$
What I should do now?
Future someone, the following two lines helped me solve the issue:
wget https://raw.githubusercontent.com/deepmind/torch-totem/master/rocks/totem-0-0.rockspec
sudo luarocks install totem-0-0.rockspec
You may have to restart your system to get it working!
I am trying since two days to install OpenCV 2.3.0 or 2.3.1 on my mac 10.6.8 snow leopard. I followed the following commands
$ cd /Users/ateendra/Desktop/OpenCV-2.3.0/
$ mkdir build
$ cd build/
$ cmake -D CMAKE_OSX_ARCHITECTURES=i386 -D CMAKE_C/CXX_FLAGS=-m32 ..
$ ccmake .
$ make -j8
$ sudo make install
now i get the following errors
/Users/ateendra/Desktop/OpenCV-2.3.0/modules/highgui/src/grfmt_exr.hpp:83: error: reference to ‘PixelType’ is ambiguous
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers /QuickdrawTypes.h:193: error: candidates are: typedef SInt8 PixelType
/opt/local/include/OpenEXR/ImfPixelType.h:49: error: enum Imf::PixelType
/Users/ateendra/Desktop/OpenCV-2.3.0/modules/highgui/src/grfmt_exr.hpp:83: error: ‘PixelType’ does not name a type
make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/src/loadsave.o] Error 1
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
Well, this is a common problem to compile opencv under mac os, though it is usually solvable by modifying opencv sources a bit. (I faced this problem twice, and I always changed sources a bit to make everything compile).
However, the last time I was installing opencv, I've just used brew:
brew install opencv
Didn't have any problems with it.
I've managed to install OpenCV 2.3.1 on OSX 10.6.8, but I've done it using MacPorts, (which I recommend as it deals with dependencies and building for you):
Make sure you've got Apple Developer Tools installed (or at least XCode with the command line tools)
Install MacPorts (if you haven't done so already)
Install OpenCV via MacPorts:
sudo port install opencv
For more details see Build via MacPorts on the wiki.
I also have to mention that I did run into an error, but that was because of a previous existing dylib in the wrong place.