How do I install OpenCV 3 on Centos 6.8? - python

I'm working on a CentOS cluster right now and have Python2.7 installed. I've managed to get OpenCV 2.4 installed (using these helpful instructions) but it does not have all of the functionality of 3 (I need the connectedComponents function and a couple others not available). Omitting the "checkout tags" step results in errors during "cmake". Something else to note is when I attempt to install the ffmpeg package it tells me no such package is available. Error:
CMake Error at 3rdparty/ippicv/downloader.cmake:77 (message):
ICV: Failed to download ICV package: ippicv_linux_20151201.tgz.
Status=6;"Couldn't resolve host name"
Call Stack (most recent call first):
3rdparty/ippicv/downloader.cmake:110 (_icv_downloader)
cmake/OpenCVFindIPP.cmake:237 (include)
...

I've managed to get OpenCV 2.4 installed (using these helpful instructions) but it does not have all of the functionality of 3 (I need the connectedComponents function and a couple others not available).
Why don't you just download OpenCV 3 then?
Something else to note is when I attempt to install the ffmpeg package it tells me no such package is available.
You can download the file yourself from here (the package that is not available for you).
Then place it in the folder where it initially would have been downloaded to:
<your opencv build>/3rdparty/ippicv/

It seems like OpenCV 3 would be better suited for what you are doing, you even said yourself that you are needing features that aren't available in 2.7.
The OpenCV 3.0 documentation actually has a full guide on installing the latest version of the library using the Yum feature in your terminal. It walks you through every step and explains them all in detail, including the Cmake steps which seem to be giving you trouble. I would recommend taking a look at the guide which is linked here.

Related

RDKit installation under Windows and Python3.7.4

RDKit could be a nice package if it wasn't so complicated to install.
Here on SO, there are several questions having problems with the installation of RDKit.
However, on different operating systems or different environments.
My configuration is:
Win10, Python 3.7.4, pip is installed, PATH is set, PYTHONPATH is set.
The installation of other modules is working fine via python -m pip install <package>.
I'm aware that the site recommends the fastest installation with Anaconda.
However, I don't have and don't want Anaconda.
On the webpage it says:
"Get the appropriate windows binary build from: https://github.com/rdkit/rdkit/releases".
However, there are no binaries of the latest versions.
This means, I would have to build it from source. I'm hesitating because the process seems to be pretty complicated, many extra installations with new problems and unknowns, and furthermore, the instructions seem to be outdated and incomplete for somebody who would build binaries from the source for the first time.
So, then I tried some unofficial binaries of RDKit.
If I unpack them and set the paths according to instructions, I get this error message:
>>> from rdkit import Chem
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\xyz\Programs\RDKit\rdkit\__init__.py", line 2, in <module>
from .rdBase import rdkitVersion as __version__
ImportError: DLL load failed: The specified module could not be found.
So, finally my questions:
How to properly install RDKit with the above mentioned configuration?
What is the specified DLL which is missing?
Where is it expecting it and searching it?
Are these RDKit 3.6 binaries maybe incompatible with Python 3.7.4?
I'm pretty sure it is probably a "small" thing (a path here or a check there), but I'm stuck. Thank you for any hints.
Update:
Apparently, it is not just a "small" thing. Chances to get this to work are most likely very low.
In the meantime I found this:
https://github.com/rdkit/rdkit/issues/1812
https://github.com/rdkit/rdkit/issues/2389
If the author of rdkit writes (April 2019):
I would be happy to be able to do pip distributions of the RDKit, but
to the best of my knowledge no one has managed to figure out how to
make it actually work.
I'd be happy to accept a PR from someone who has figured this out, but
I am not likely to have the time to do this myself anytime in the near
future.
So, if anybody feels capable achieving this, please feel free.
I will invest time in something else or will have to switch to Anaconda if I want to use RDKit.
On the webpage you linked there is a section about missing DLLs:
"In Win7 systems, you may run into trouble due to missing DLLs, see one thread from the mailing list: http://www.mail-archive.com/rdkit-discuss#lists.sourceforge.net/msg01632.html You can download the missing DLLs from here: http://www.microsoft.com/en-us/download/details.aspx?id=5555"
Not sure if this helps

Configure error while installing graph-tool on ubuntu 14.04

So I spent a whole day trying to find out the solution for this. I am trying to install graph-tool on my machine with 14.04 OS. Initially I was unable to succeed because I didn't have gcc 5 on my machine. After installing it, I am trying the following:
./configure CXX='g++5'
and I get the following error:
===========================
Using python version: 2.7.6
===========================
checking for boostlib >= 1.54.0... configure: We could not detect the boost libraries (version 1.54 or higher). If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.
checking whether the Boost::Python library is available... no
configure: error: No usable boost::python found
I see no solution on the mailing list of graph-tool or stackoverflow about this problem. I would be really grateful if somebody could help me with this.
Thanks in advance.
In Debian, the libraries are almost always split in two packages: One
containing the shared object and another one with "-dev" suffix which
contains the header files. For cairomm you need to install the
libcairomm-1.0-dev package, in addition to libcairomm-1.0.
And cairo support is optional. If you want to disable it, just pass
the --disable-cairo to the configure script.
Source: https://lists.skewed.de/pipermail/graph-tool/2013-November/001094.html
There are some issues with the boost package on ubuntu 14.04 and some of the graph-tool functions (see graph-tool - k-shortest path - boost::coroutine was not found at compile-time and http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/Debian-package-and-boost-at-compile-time-td4026383.html ). At current it seems neccessary to compile boost from source until a newer version of boost is uploaded to the repository in order for graph-tool to work fully.
Once this bug is fixed (https://bugs.launchpad.net/ubuntu/+source/boost1.54/+bug/1529289) it will no longer be a problem.

OpenCV 3.0.0 with extra modules - imgproc dependency

I have downloaded the latest master-branches of opencv 3.0 and the extra modules from itseez's github. Following the instructions for compiling opencv 3.0 with modules, I used the following command line on Ubuntu 14.04
cmake -DOPENCV_EXTRA_MODULES_PATH=/home/.../opencv-3.0.0-beta/opencv_contrib-master/modules /home/.../opencv-3.0.0-beta
where 1st path leads to modules folder and the 2nd one leads to opencv 3 sources.
Among other errors/warnings I am especially concerned with this one
-- Module opencv_tracking disabled because opencv_imgproc dependency can't be resolved!
since I am most interested in tracking module. Is there any way to help the cmake resolve this dependency? Extensive googling yielded no answer and I am not a linux compilation guru either.
Thanks in advance.
The issue was solved by moving on and cloning the pure latest master of both opencv 3 and contrib. Previously I downloaded them as zip.

Install tesseract/pytesser on Mac OS X

I am trying to install this (and additionally pytesser) for osx 10.9 (with anaconda as default python). I have looked around online but I can't get any of the tutorials to work as they all seem to be extinct (homebrew doesn't have a formula for leptonica for instance). I have probably been struggling to install this for the best part of a week with absolutely no luck at all.
Has anyone managed to succeed recently-how did you do it?
Thanks
Edit: Strangely the brew for leptonica has spluttered into life. I have the fairly strange error below.
brew install tesseract
==> Downloading https://bitbucket.org/3togo/python-tesseract/downloads/tesseract
Already downloaded: /Library/Caches/Homebrew/tesseract-3.03-rc1.tar.gz
==> ./configure --prefix=/usr/local/Cellar/tesseract/3.03-rc1
checking for leptonica... yes
checking for pixCreate in -llept... yes
checking leptonica version >= 1.70... configure: error: in `/private/tmp/tesseract- 19Ol/tesseract-3.03':
configure: error: leptonica 1.70 or higher is required
See `config.log' for more details
READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting
i.e it is registering the install but still not working. I will check out the config. file as instructed
Edit 2:
Upon trying to import the library in python I get this:
import tesseract
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "//anaconda/lib/python2.7/site-packages/python-tesseract_0.8-3.0-py2.7_macosx-10.9- intel.egg/tesseract.py", line 28, in <module>
_tesseract = swig_import_helper()
File "//anaconda/lib/python2.7/site-packages/python-tesseract_0.8-3.0-py2.7_macosx-10.9-intel.egg/tesseract.py", line 24, in swig_import_helper
_mod = imp.load_module('_tesseract', fp, pathname, description)
ImportError: dlopen(//anaconda/lib/python2.7/site-packages/python-tesseract_0.8-3.0- py2.7_macosx-10.9-intel.egg/_tesseract.so, 2): Library not loaded: /usr/local/lib/libtesseract.3.dylib
Referenced from: //anaconda/lib/python2.7/site-packages/python-tesseract_0.8-3.0-py2.7_macosx-10.9-intel.egg/_tesseract.so
Reason: image not found
To be honest I am a complete amateur with respect to any of this behind the scenes installation and had to google extensively to even get this far. I would be really grateful if someone with a bit of knowledge could shed any light on the obvious things to try, as I feel as though I have exhausted the web looking for solutions and am getting close to considering this library unuseable and attempting to write my own ocr library-100% not a job I am looking forward to. Alternatively, if anyone knows any decent python ocr libraries with decent support/ install mainatenance I would love to know about them (From my google searching I suspect that tesseract is by far the best known, which is why it is so frustrating that the install is so tricky)
I will happily provide any any more info about my system etc to any warrior willing to have a crack at helping with this.
Thanks!
You need to install tesseract first
https://bitbucket.org/3togo/python-tesseract/downloads/tesseract.rb
For details,
https://code.google.com/p/python-tesseract/wiki/HowToCompileForHomebrewMac
I have just installed tesseract 3.02 using brew without any issues (osx 10.9). If you don't need version 3.03, you may want to try installing 3.02. Instructions on installing a different version using brew: Homebrew install specific version of formula?
Otherwise, based on your log, the brew install did not complete successfully so tesseract can not be imported. Brew downloads the source, runs configure, then does make install. The configure step is failing because you need leptonica 1.70. Usually brew would detect this dependency and install leptonica 1.70 for you.
You may want to try installing leptonica yourself: http://www.leptonica.com/download.html. Instructions on building: http://www.leptonica.com/source/README.html

Problems building node.js on Cygwin, please help

I'm trying to get node.js running on Windows 7. I have no experience with Linux so I've just been blindly following instructions from tutorials I've found, but I'm still unable to build node.js.
What I did:
Install Cygwin - the entirety
Attempt to build node.js
This is the error I first got:
I then followed the commands of two other similar sites and they all resulted in this error (could getting several version of node have caused me more problems? I'm completely clueless on this).
I read somewhere that the Windows version of Python could be causing the problem so I uninstalled my Python 2.7 and added C:\cygwin\bin to the PATH.
That still didn't work and I read somewhere else that I'm supposed to rebaseall so I tried that, but I also got an error for that:
That's where I'm at now. Have any steps I've taken exacerbated the situation?
Add -e '/\/sys-root\/mingw\/bin/d' at line 110 in /bin/rebaseall file.
Then re-run rebaseall -v and you shouldn't get the error anymore.
See this pretty helpful blog posting - Node on CygWin doesn't work for Node v0.2.5. Use the latest v0.4.0 version instead.
Also consider the post's recommendation of compiling against MinGW instead of in CygWin.
First of all, why did you check out such an old release v0.2.5? When I did it a few weeks ago I just took the latest and ended up with 0.5.0pre, but it would also be reasonable to specify v0.4.3. For instance, type git clone git://github.com/joyent/node.git to download node, and then:
cd node
./configure
make install
Secondly, do not rebase by running ash from the CYGWIN shell. Instead, shutdown all Cygwin processes, then use Windows explorer to open the ash.exe binary. Since I have a Windows 7 system without node.js, I decided to follow my instructions and build. Not so easy. I ran into some wierd dll issues that all went away when I ran ./rebaseall followed by ./perlrebase from the ash prompt. It seems that rebaseall is not sufficient anymore.
Thirdly, there is a message that makes it sound like you don't have a C compiler. Some googling will lead you to sites telling which Cygwin packages you need, but at minimum install the g++ compiler and that should pull in C as a dependency.
When I did this I simply ran configure and every time there was an error, installed one more Cygwin package to supply the missing piece. Even OpenSSL is available.
What I just found is remove the windows based install of Python. After uninstalling this, everything is peachy.
I like cygwin a lot -- but recent releases have become pretty unreliable. Some packages just wont build, and some "standard" apps dont work e.g. gvim's "save as" bombs out on my installation.
A possible solution would be run one of the better Linux distributions (ubuntu, fedora, suse etc.) either as a virtual machine or a dual boot setup and do the build inside linux.

Categories

Resources