Caffe2 installed correct but can't load glog library - caffe2

I pip installed caffe2 via a "Prebuilt Caffe2 Python Wheel" without an error. But running the first example I get the following error message which seems not be able to find/load "/usr/local/opt/glog/lib/libglog.0.dylib".
If I import caffe2.python it does not give me an error.
The glog is missing in usr/local/opt.
Is this a Mac GPU problem ? I know that CUDA is a problem/does not run on Mac or is there anything else I missed/I have to do. ?
Thanks for any help.
WARNING:root:This caffe2 python run does not have GPU support. Will run in CPU only mode.
WARNING:root:Debug message: No module named caffe2_pybind11_state_gpu
CRITICAL:root:Cannot load caffe2.python. Error: dlopen(/usr/local/lib/python2.7/site-packages/caffe2/python/caffe2_pybind11_state.so, 10): Library not loaded: /usr/local/opt/glog/lib/libglog.0.dylib
Referenced from: /usr/local/lib/python2.7/site-packages/caffe2/python/caffe2_pybind11_state.so
Reason: image not found

Related

Error while knitting Rmarkdown with reticulate: OSError: libomp.dylib not found

I'm trying to knit an Rmarkdown with reticulate for a chunk of python code.
Knitting throws out an error saying libomp.dylib not found, but the code runs fine as a chunk (not knitted).
Machine: Macbook M1 Max
OS: Ventura 13.0.1
I used below packages for python with reticulate.
library(reticulate)
use_python("/Users/ramanujam/opt/anaconda3/bin/python")
from lazypredict.Supervised import LazyClassifier
from sklearn.model_selection import train_test_split
I'm Getting the error below.
However, code executes fine as a chunk.
Error in py_call_impl(callable, dots$args, dots$keywords) :
OSError: dlopen(/Users/xxx/opt/anaconda3/lib/python3.9/site-packages/lightgbm/lib_lightgbm.so, 0x0006): Library not loaded: /usr/local/opt/libomp/lib/libomp.dylib
Referenced from: <8DF2AF67-B85F-3F67-B687-E50A514307EC> /Users/xxx/opt/anaconda3/lib/python3.9/site-packages/lightgbm/lib_lightgbm.so
Reason: tried: '/usr/local/opt/libomp/lib/libomp.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/libomp/lib/libomp.dylib' (no such file), '/usr/local/opt/libomp/lib/libomp.dylib' (no such file), '/Library/Frameworks/R.framework/Resources/lib/libomp.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/jre/lib/server/libomp.dylib' (no such file)
I underestand this is a dependency on libomp.
I already tried installing libomp with
brew install libomp
Tried creating a symlink to R.framework path from the brew install location but there is a conflict of architecture there.
Since the code executes in chunk but has trouble during knitting, I'm guessing the libomp source used is different there. But I'm not clear on how or why Rstudio would have a different source while running in chunks vs. knitting as I have specified the python path to be used.
Any help would be appreciated. Thanks in advance!

dyld: Library not loaded: /usr/local/opt/gsl/lib/libgsl.23.dylib

I am trying to get a piece of software called emergent working. It relies on qt and coin, which I've both installed.
But when I try to run emergent, I get the following error:
dyld: Library not loaded: /usr/local/opt/gsl/lib/libgsl.23.dylib
Referenced from: /usr/local/bin/emergent
Reason: image not found
Abort trap: 6
gsl 2.6 is already installed on my computer. Also using Mac OS. Any ideas what could be causing this?
ls /usr/local/opt/gsl
see which version of the library you have (I had .25)
then
ln -s libgsl.25.dylib libgsl.23.dylib
Makes symbolic link between files.
then it worked!

GHCi could not load .dll lib (C++ lib) on Windows

I've installed a C++ lib successfully via vcpgk, named: lmdb:x64-windows
I also installed lmdb binding package for Haskell by Cabal install
And when trying to test the lmdb package:
module Persistence where
import Database.LMDB.Raw
GHCi compiled and loaded it:
[1 of 1] Compiling Persistence ( Persistence.hs, interpreted )
Ok, modules loaded: Persistence.
But it throws error when I try to call any functions in lmdb Raw lib:
*Persistence> lmdb_version
ghc.exe: addDLL: lmdb.dll (Win32 error 126): The specified module could not
be found.
ghc.exe: Could not load `lmdb.dll'. Reason: addDLL: could not load DLL
ghc.exe: C:\Users\thanhdo\AppData\Roaming\cabal\x86_64-windows-ghc-
8.0.2\lmdb-0.2.5-1uQhV16mebP51rtMgitOcY\HSlmdb-0.2.5-
1uQhV16mebP51rtMgitOcY.o: unknown symbol `mdb_dbi_close'
ghc.exe: unable to load package `lmdb-0.2.5'
I was searching around and was trying several approaches but still can't resolve this error. I'm using Windows 7 64bit, Haskell platform 8.0.2. Thanks in advance.
As per discussion in comment section, I was trying to tell GHCi the location of lmdb's dll. It works after I modify %path% env.
In my case, the path was: vcpkg\installed\x64-windows\bin

Getting this error *** OSError: cannot load library C:\WINDOWS\libzsfc.dll: error 0xc1

I am trying to load a .dll file using python cffi library, but whiele I am trying to load it I am getting following error:-
*** OSError: cannot load library C:\WINDOWS\libzsfc.dll: error 0xc1
I am using this
from cffi import FFI
ffi = FFI()
lib = ffi.dlopen("libzsfc.dll")
but this giving me error, I tried a lot to resolve this, but it remains same, please let me know if anyone faced same issue.
I think you have to first register the dll in windows then load will work fine.
To register the same use command regsvr32 <complete dll path>
Use Regsvr32.exe from the %SystemRoot%\Syswow64 folder. For example, type the following commands to register the DLL: cd \windows\syswow64 regsvr32 c:\filename.dll
Old question, but I just had the same issue. Fixed:
Super easy - reinstall tessaract. Head over to https://github.com/UB-Mannheim/tesseract/wiki. Get their installer. It'll have you uninstall the old version. Worked immediately for me.

Mac/Django error message: "/mercurial/osutil.so: no appropriate 64-bit architecture"

I'm new to Macs (and quite new to Django) and I'm setting up an existing Django/MySQL site that uses Mercurial as a site package, on a new Macbook Pro.
All was going well during installation - no error messages. I installed the default versions of most packages from macports.
However when I try runserver, localhost shows the following error message:
ImportError at /
.../lib/python2.6/site-packages/mercurial/osutil.so: no appropriate 64-bit architecture (see "man python" for running in 32-bit mode)
Please could anyone advise? I've tried typing the following at the terminal:
defaults write com.apple.versioner.python Prefer-32-Bit -bool yes
but it didn't help.
I've gotten a similar error and a combination of two things helped me install Mercurial for OS X Lion. I'm running OS X 10.7.3.
First, there is a bug on line 455 of the setup.py script (at least for Mercurial 2.2.1, the version I tried). The line
version = runcmd(['/usr/bin/xcodebuild', '-version'], {})[0].splitlines()
should be replaced with
version = runcmd(['/usr/bin/xcodebuild', '-version'], {})[0]
Second, after I installed Mercurial (either by easy_install, Mac OS X binary installer, and compilation), I kept getting the following error message:
ImportError: dlopen(/Library/Python/2.7/site-packages/mercurial/osutil.so, 2): no suitable image found. Did find: /Library/Python/2.7/site-packages/mercurial/osutil.so: mach-o, but wrong architecture
However, after seeing this post, I noticed that
defaults read com.apple.versioner.python Prefer-32-Bit
outputs 1 on my system. However, running this command
defaults write com.apple.versioner.python Prefer-32-Bit -bool no
and then recompiling / installing mercurial resulted in a working executable for me at the end.
If everything from my comment checks out, try setting that Prefer-32-bit in an user environment variable instead of at the command line.
Edit this file: ~/.MacOSX/environment.plist
See:
http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/EnvironmentVars.html#//apple_ref/doc/uid/20002093-113982