-
Notifications
You must be signed in to change notification settings - Fork 91
Install-From-Source-Guide: outdated instructions (Mac) #114
Comments
I don't have it working yet, but I was able to get butterflow to install without errors on a MacBook Pro running Mojave. I added these lines to my ~/.profile: Then ran the instructions found in Install from Source Guide. But running the snippet at the end showed that five of the ffmpeg flags were not available. That might be my issue... |
@andrewmackenzie Try installing ffmpeg from https://github.com/varenc/homebrew-ffmpeg — I cannot confirm if this works as it doesn't work on macOS Catalina yet. |
I see references to butterflow all over the internet when frame interpolation comes up, so it's a bit surprising it's not just an installable Homebrew formula. If someone can get this working on a contemporary version of macOS, probably worthwhile to make it a formula. |
I need help with the very last stage of this. I am not a software engineer of any kind so my nix skills aren't great, but I have managed by hook and crook to get to the last part of the process. |
Here's a step-by-step of worked for me on macOS 10.15 Catalina: Install the Xcode commandline tools if you need to note that opencv@2 depends on ffmpeg now so it gets installed automatically - see https://formulae.brew.sh/formula/opencv@2 Install pip, which'll then let us install virtualenv Note that it'll give you the following info, which we can ignore for now cd to wherever you want to put your code, e.g. Create the virtualenv - we'll just refer to the newly-install virtualenv binary directly instead of adding it to our PATH like the warning above says. Note that Navigate into the folder Tell butterflow where the homebrew python site-packages are by using a .pth file activate the virtualenv now we're inside the virtualenv, set the compile flags so the clang compiler knows where things are
OK, we're hopefully ready to install! - test that it works exit the virtualenv NOTE: to use butterflow outside of the virtualenv environment, you'll need to set the PYTHONPATH permanently for your shell, e.g. something like: Hope that helps somebody! |
Oh, I forgot to mention. If you can't compile because of a
Then hopefully it should compile fine on macOS. |
I wonder if anyone has successfully installed this in OSX (10.14.6 (18G103)). I successfully linked the modules required but I get too many error and warning during installation. /usr/local/opt/opencv@2/include/opencv2/opencv2/core/core.hpp:48:10: error: #include nested too deeply
#include "opencv2/core.hpp"
^
In file included from /Users/m/Labs/butterflow/butterflow/ocl.cpp:10:
/usr/local/include/opencv2/core/ocl.hpp:631:5: error: unknown type name 'CV_DEPRECATED'
CV_DEPRECATED bool read(const String& buf, const String& buildflags); // removed, use ProgramSource instead
^
/usr/local/include/opencv2/core/ocl.hpp:631:19: error: expected member name or ';' after declaration specifiers
CV_DEPRECATED bool read(const String& buf, const String& buildflags); // removed, use ProgramSource instead
~~~~~~~~~~~~~ ^
/usr/local/include/opencv2/core/ocl.hpp:632:5: error: unknown type name 'CV_DEPRECATED'
CV_DEPRECATED bool write(String& buf) const; // removed, use getBinary() method instead (RAW OpenCL binary)
^
/usr/local/include/opencv2/core/ocl.hpp:632:19: error: expected member name or ';' after declaration specifiers
CV_DEPRECATED bool write(String& buf) const; // removed, use getBinary() method instead (RAW OpenCL binary)
~~~~~~~~~~~~~ ^
/usr/local/include/opencv2/core/ocl.hpp:633:5: error: unknown type name 'CV_DEPRECATED'
CV_DEPRECATED const ProgramSource& source() const; // implementation removed
^
/usr/local/include/opencv2/core/ocl.hpp:633:19: error: expected member name or ';' after declaration specifiers
CV_DEPRECATED const ProgramSource& source() const; // implementation removed
~~~~~~~~~~~~~ ^
/usr/local/include/opencv2/core/ocl.hpp:634:5: error: unknown type name 'CV_DEPRECATED'
CV_DEPRECATED String getPrefix() const; // deprecated, implementation replaced
^
/usr/local/include/opencv2/core/ocl.hpp:634:25: error: expected ';' at end of declaration list
CV_DEPRECATED String getPrefix() const; // deprecated, implementation replaced
^
;
/usr/local/include/opencv2/core/ocl.hpp:635:5: error: unknown type name 'CV_DEPRECATED'
CV_DEPRECATED static String getPrefix(const String& buildflags); // deprecated, implementation replaced
^
/usr/local/include/opencv2/core/ocl.hpp:635:19: error: expected member name or ';' after declaration specifiers
CV_DEPRECATED static String getPrefix(const String& buildflags); // deprecated, implementation replaced
~~~~~~~~~~~~~ ^
/Users/m/Labs/butterflow/butterflow/ocl.cpp:58:11: error: unknown type name 'DeviceInfo'
const DeviceInfo& currentDevice = Context::getContext()->getDeviceInfo();
^
/Users/m/Labs/butterflow/butterflow/ocl.cpp:58:48: error: no member named 'getContext' in 'cv::ocl::Context'
const DeviceInfo& currentDevice = Context::getContext()->getDeviceInfo(); I wonder if there is any workaround available for OSX. 🤔 |
yes as mentioned I’ve successfully installed it on OS X with the steps above |
Hi Thanks for these steps @ManxStef ! I followed it successfully until I got this error after running this command: sudo python2 setup.py install Does anyone know how to fix that? |
Bump, same error here - trying to install it on MacOS BigSur: fatal error: I followed @ManxStef directions up to python2 setup.py install Anyone could help? |
I'm also on mac big sur and am stuck on "fatal error: 'opencv2/core/core.hpp' file not found" |
even with all of the other steps ( thanks @ManxStef ) I still needed to |
The issue is that when one runs However, on Big Sur, one no longer needs to use sudo here. However, and I am not entirely clear how or why this has happened, but in my case, I get a new error, which is :
It seems Guide to compiling for macOS Big Sur:Big thanks to @ManxStef, the first part of this guide is a literal copy and paste from his Catalina guide. Install the Xcode commandline tools if you need to note that opencv@2 depends on ffmpeg now so it gets installed automatically - see https://formulae.brew.sh/formula/opencv@2 Install pip, which'll then let us install virtualenv Note that it'll give you the following info, which we can ignore for now cd to wherever you want to put your code, e.g. Create the virtualenv - we'll just refer to the newly-install virtualenv binary directly instead of adding it to our PATH like the warning above says. Note that Navigate into the folder Tell butterflow where the homebrew python site-packages are by using a .pth file activate the virtualenv now we're inside the virtualenv, set the compile flags so the clang compiler knows where things are
Now, because of a mysterious relocation of an
Finally, we are ready to install. Hold onto your butt: |
In the dependencies section, it says:
macOS:
Install Homebrew, then
brew install ffmpeg
andbrew install homebrew/science/opencv --with-ffmpeg
.The homebrew/science branch was deprecated as all formulae were moved elsewhere. The closest package I could find by name was
opencv@2
by simply doingbrew install opencv@2
however--with-ffmpeg
is an invalid option when I tried substituting with this.(edit: overlooked package
opencv
because I'm stupid but same invalid option error thrown)The text was updated successfully, but these errors were encountered: