Advertisement
Guest User

Untitled

a guest
Sep 21st, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. echo 'Start Open CV Install for Raspberry'
  2.  
  3. echo 'Install prerequisites on your Raspberry Pi'
  4. read -p "Press enter to continue"
  5. $ sudo apt-get install libhdf5-dev libhdf5-serial-dev libhdf5-100
  6. $ sudo apt-get install libqtgui4 libqtwebkit4 libqt4-test python3-pyqt5
  7. $ sudo apt-get install libatlas-base-dev
  8. $ sudo apt-get install libjasper-dev
  9.  
  10.  
  11. echo 'Here’s how to install virtualenv and virtualenvwrapper, the tools I use to get it done:'
  12. read -p "Press enter to continue"
  13. $ pip install virtualenv virtualenvwrapper
  14.  
  15.  
  16.  
  17. echo 'Then you need to add the following lines to your ~/.bashrc . Open the file using nano , vim , or emacs and append these lines to the end:'
  18. read -p "Press enter to continue"
  19. echo '# virtualenv and virtualenvwrapper'
  20. echo 'export WORKON_HOME=$HOME/.virtualenvs'
  21. echo 'export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3'
  22. echo 'source /usr/local/bin/virtualenvwrapper.sh'
  23.  
  24.  
  25.  
  26. echo 'source ~/.bashrc'
  27. read -p "Press enter to continue"
  28. source ~/.bashrc
  29.  
  30.  
  31. echo 'mkvirtualenv cv -p python3'
  32. read -p "Press enter to continue"
  33. mkvirtualenv cv -p python3
  34.  
  35.  
  36. echo 'workon cv'
  37. read -p "Press enter to continue"
  38. workon cv
  39.  
  40.  
  41.  
  42. echo 'pip install opencv-contrib-python'
  43. read -p "Press enter to continue"
  44. pip install opencv-contrib-python
  45.  
  46.  
  47.  
  48. echo 'pip install "picamera[array]"'
  49. read -p "Press enter to continue"
  50. pip install "picamera[array]"
  51.  
  52.  
  53.  
  54. echo 'Testing our pip install of OpenCV'
  55. read -p "Press enter to continue"
  56. $ workon cv
  57. $ pip install imutils
  58. $ pip install "picamera[array]" # if you're using a Raspberry Pi
  59.  
  60.  
  61.  
  62. echo 'Should Be finished'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement