Class RunLoopModeTracker is implemented in both - Qt - bash

Just to precise I'm a total beginner in this. I check on the internet and it seems that nothing match to this problem.
My goal is to run this github which is a facial recognition program: https://github.com/anisayari/easy_facial_recognition
So here is the error:
Class RunLoopModeTracker is implemented in both
/Users/pierre/anaconda3/lib/python3.7/site-packages/cv2/.dylibs/QtCore (0x1086267f0)
and /Users/pierre/anaconda3/lib/libQt5Core.5.9.7.dylib (0x122fc0a80).
One of the two will be used. Which one is undefined.
From what I understand, I just have to indicate which one to use but I don't find anything about how to do it. Also, It seems to be a recurrent error on Mac.

I had this error on my Mac too. Apparently opencv's GUI tools were conflicting with the PYQT libraries that were also installed on my system in my anaconda/lib/ folder. So to give opencv just one set of GUI tools and since I wasn't sure what else was using PYQT in my lib, I chose to use the non-GUI version of opencv, aka opencv-python-headless. I previously had opencv-python-headless installed on my system, and maybe the two packages can't co-exist in the new version of OpenCV or with Catalina.
I removed opencv-python
pip uninstall opencv-python
uninstalled and reinstalled the headless version (which has no GUI tools)
pip uninstall opencv-python-headless
pip install opencv-python-headless
I don't know if it was necessary to remove then reinstall the existing headless package, but that's what I did. I wasn't sure that opencv-headless would find the PYQT in my lib but it didn't have any problems.

Related

Install graph-tool on Mac OS, graph drawing issue

In the end, created an env to install graph-tool thru the channel vgauthier.
Thinking by now that I might have as well used earlier version of python or installed a whole new python latest version just for this.
But as it is all part of the learning process to creating dev. env.. (at the same time worrying my Mac has too many installations with much too interlinked dependencies)
Someone kindly let me know if this rings any bell or got any suggestion:
Incompatible library version states that _cairo.cpython-36m-darwin.so requires later version of libcairo.2.dylib.
Errors could have been from:
having on .condarc file, wrong priorities btw channels, so having trouble finding the right files
(modified to the order of conda-forge > ~dir/vgauthier > default
my having given up on installing pygobject after googling it is not supported on Mac OS (which was apparently wrong or I just wasnt searching well)
Solution to easy setup of graph-tool for conda-installed python users:
Get the benefit of GUI (seriously a god option) ->
https://medium.com/#ronie/installing-graph-tool-for-python-3-on-anaconda-3f76d9004979
To still continue with command line (still get the idea from GUI)
conda install -c pkgw-forge gtk3
conda install -c https://conda.anaconda.org/fallen pygobject
(if there are cairo blah blah missing, look up setup directions for igraph which has more information and help, having been an older library)
Do these before installing graph-tool, which Im still wondering why I cannot remove from the system though. ;)
For others, https://git.skewed.de/count0/graph-tool/wikis/installation-instructions#compiler-choice-in-macos-x

Where is Qt Maintenance Tool in Homebrew

I have installed Qt with Homebrew. Everything is working fine for Desktop Application Development. But I do not find Maintenance Tool. Do I need to install that separately with brew ?
It does not exist, since homebrew tries to be a package manager like they exist on linux environtments. Just like cygwin/msys2 for windows. So they provide one qt build and that's it.
You can still install the official binary distribution from Qt which contains the Maintenance Tool. You can think of the Maintenance Tool as Qt's internal package manager, that can install official Qt binaries.

You might be loading two sets of Qt binaries into the same process

I am trying to run python code in virtual environment of conda. The thing is I have installed opencv using brew and using python from anaconda environment. There is library called qt which is in both (brew and conda). Now when I try to run my code it says you are loading two sets of qt binaries in the same process. I understood the error but I don't know how to disable qt binary either from conda or from brew.
After deleting the one from conda it works fine but some dependencies also gets deleted. Don't want that. Can somebody suggest me some way.
If OpenCV's gui functionality is not required, then this is an option to avoid qt conflict.
pip uninstall opencv-python
pip install opencv-python-headless

Error installing control v3.0.0 package on El Capitan for Octave

I recently installed Octave using the binary installer found on this site: http://wiki.octave.org/Octave_for_MacOS_X
I then tried to install the control package using 'pkg install -forge control' but it gave me the error 'pkg: error running `make' for the control package.'. I have gone through most of the threads regarding this error but with no success.
I then tried to use MacPorts to install the control package, I followed the instructions on the wiki page above with some help from this thread: Installing general package in octave has error. I believe I succeeded installing the packages because I can see them in the folder tree for Octave and MacPorts says it is installed when using the console.
The problem is that when i run some code in Octave it cannot build as it doesn't know that I have installed any additional packages. Using 'pkg list' in Octave it says that no additional packages installed. I feel like I need to link the two together but I don't know how?
I'll happily explain more if I need to and I hope you can help me out.
Many Thanks,
Sam.
You cannot "link the two together" (assuming you mean the binary version of octave and the MacPorts version).
If you have packages installed via MacPorts for the MacPorts version of octave, then they will only be available from the the MacPorts version of octave, so make sure you are running that.
Otherwise, figure out how to install the package with the octave binary version. It seems you require a build environment for this, but installing the command line tools (which you must have done for MacPorts to work) might have already solved this problem.
It seems to be a problem with gfortan compiler built-in with Octave. To solve this you should install an external fortran compiler.
Try this:
Install Xcode and command line tools for Xcode
Download and install a fortran compiler for MacOS, for example: http://coudert.name/software/gfortran-6.1-ElCapitan.dmg
Change the fortran compiler path in your octave, to this if you installed the compiler that I suggested in point number 2 you only must to open Octave and type: setenv('F77', '/usr/local/gfortran/bin/gfortran').
And Enjoy Octave for MacOS
Octave with control package 3.0.0 on MacOS
You haven't provided enough information for a precise diagnostic, but I had the same error message (and a few more), and re-installing octave from source solved it; see this link for more info, but essentially you can do it by running brew reinstall --build-from-source octave.

How to install macports openmpi on Mac osx 10.5.8?

I want the latest version of openmpi. I like to use macports because it is easy to install, uninstall, and upgrade software. I have installed the latest mpi via building from source, but no one seems to be able to get it to build properly with macports. There is always a build error. There are tickets (and you can see the logs at ), but they seem to be collecting dust and it seems strange that no one had found a solution.
I have tried uninstalling the built in version (I know, openmpi says not to do that--but it works fine if I reinstall it--even in a different directory), but I still the same build errors. I also tried with different gcc.
Does anyone know what is so difficult about getting openmpi via macports?
sudo port install openmpi
worked for me

Resources