Advertisement
Guest User

Untitled

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