question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Install-From-Source-Guide: outdated instructions (Mac)

See original GitHub issue

In the dependencies section, it says:

macOS:

Install Homebrew, then brew install ffmpeg and brew 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 doing brew 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)

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:7
  • Comments:14

github_iconTop GitHub Comments

10reactions
thurecommented, Jan 31, 2020

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.

3reactions
ManxStefcommented, Jun 4, 2020

Here’s a step-by-step of worked for me on macOS 10.15 Catalina:

Install the Xcode commandline tools if you need to xcode-select --install

note that opencv@2 depends on ffmpeg now so it gets installed automatically - see https://formulae.brew.sh/formula/opencv@2 brew install opencv@2

Install pip, which’ll then let us install virtualenv sudo easy_install pip pip install virtualenv

Note that it’ll give you the following info, which we can ignore for now WARNING: The script virtualenv is installed in ‘/Users/yourusername/Library/Python/2.7/bin’ which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

cd to wherever you want to put your code, e.g. cd ~, then clone the butterflow source git clone https://github.com/dthpham/butterflow.git

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 python has been renamed to python2 and python3 in Catalina, as far as I know, so we want virtualenv to use python2 ~/Library/Python/2.7/bin/virtualenv -p /usr/bin/python2 butterflow

Navigate into the folder cd butterflow

Tell butterflow where the homebrew python site-packages are by using a .pth file echo "$(brew --prefix)/lib/python2.7/site-packages" > lib/python2.7/site-packages/butterflow.pth

activate the virtualenv source bin/activate

now we’re inside the virtualenv, set the compile flags so the clang compiler knows where things are

export LDFLAGS="-L/usr/local/opt/opencv@2/lib -L/usr/local/opt/openblas/lib"
export CPPFLAGS="-I/usr/local/opt/opencv@2/include"
export PKG_CONFIG_PATH="/usr/local/opt/opencv@2/lib/pkgconfig"
export PYTHONPATH=$PYTHONPATH:$(brew --prefix)/lib/python2.7/site-packages

OK, we’re hopefully ready to install! - sudo python2 setup.py install

test that it works butterflow --help

exit the virtualenv deactivate

NOTE: to use butterflow outside of the virtualenv environment, you’ll need to set the PYTHONPATH permanently for your shell, e.g. something like: echo "export PYTHONPATH=$PYTHONPATH:$(brew --prefix)/lib/python2.7/site-packages" >> ~/.bash_profile

Hope that helps somebody!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to download macOS - Apple Support
Download and install current or previous versions of the Mac operating system.
Read more >
MacPorts Guide
MacPorts is an easy to use system for compiling, installing, and managing open source software. MacPorts may be conceptually divided into two main...
Read more >
How to install older versions of macOS or OS X - Macworld
We'll walk you through all the steps below for installing an older version of macOS on your Mac – from making sure your...
Read more >
How to clean install macOS on your Mac - Macworld
1. We're going to re-download the installer file for our chosen version of macOS and store it on a USB stick or external...
Read more >
How to Install macOS Ventura or Monterey on Unsupported ...
There's hope for older Macs. There is, in fact, hope for users of many old Mac models. With a bit of effort, you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found