Then there’s the question of linking OpenCV to “... Homebrew Python’s site-packages directory”. Opencv2 has been renamed ... So confusing ... Note: use ‘> brew tap’ to list all taps connected for homebrewĪlso note: opencv3 does not exist anymore. I’m told “homebrew/science” is empty, so there should be no reason to link to it. At one time, OpenCV was kept in a specialized area named “homebrew/science” but was moved to “homebrew/core”. That’s not a big deal because I use Homebrew for python 2/3.
![brew install opencv takes forever brew install opencv takes forever](https://pyimagesearch.com/wp-content/uploads/2016/12/homebrew_opencv3_header.jpg)
I found several pages that suggested OpenCV be installed with Homebrew. I figured I would need them at some point, so I installed numpy, scipy, matplotlib, scikit-image, scikit-learn, ipython, and pandas. However … the Python module I tracked down (pytesseract) also required PIL (another module, part of the dependencies) and strongly suggested I install the python science packages. I decided to go ahead on my initial plan: use a Python OCR module to read the scan.
#Brew install opencv takes forever how to
I thought it would be interesting to figure out how to scan them (gif files, really!) and read the data as OCR. I was curious to find out more, but discovered that those records did not exist in searchable form. National Archives has scanned pages out of books that list American casualties that took place in World War II. I mentioned in another post about my plans for. If and when Python 3.8 or Python 4 show up, the paths will probably need to be updated to show the Python version. > ln -s /usr/local/opt/opencv3/lib/python3.7/site-packages/ cv2.so Note step 6 where a symlink is set up to point from the openCV libraries installed by home-brew and pointing back to the virtual environment
#Brew install opencv takes forever full
Instructions here show full steps for installing OpenCV.
![brew install opencv takes forever brew install opencv takes forever](https://fahmifahim.files.wordpress.com/2019/04/xcode.png)
I reloaded all the related Python modules, but still could not get the sample file to run. I installed OpenCV with homebrew and I knew it was outdated, so I upgraded it (and other dependent files) with brew. I also noticed I was having trouble with loading the modules needed for an OpenCV project. I noticed that I don’t have a requirements.txt file to make it simple to reload Python modules. I’ve worked my way through the virtual environments, removed them, recreated them and restarted them.
![brew install opencv takes forever brew install opencv takes forever](https://imgs.developpaper.com/imgs/3863983023-5d1496207d0f7_articlex.png)
I forgot that updates knocks out all the Python virtual environments that expect Python 3.6. I recently updated my laptop to run Python 3.7.0.