0

I tried to install OpenCV through Homebrew by following the steps given in http://www.pyimagesearch.com/2016/12/05/macos-install-opencv-3-and-python-3-5/ but after installing virtualenv and virtualenvwrapper I updated the path as given. When I source it I get the following

-bash: /usr/local/bin/virtualenvwrapper.sh: No such file or directory

I have macOS Sierra 10.12.6, Xcode 8.3.3.

Then I closed the Terminal and reopened it. Since then whenever I open the Terminal I see the same line in the second line of the terminal. I made a small change and installed virtualenv using

pip --user install virtualenv virtualenvwrapper

  • Whaty does which pip show? – Mark Sep 15 '17 at 8:16
  • In a vanilla Sierra & homebrew & brew installed python 3, pip doesn't exist! Some steps in the how-to aren't necessary (export path) or won't work (pip ...). – klanomath Sep 15 '17 at 17:28
  • Ys-MacBook-Air:~ hareentej22$ which python /usr/bin/python Ys-MacBook-Air:~ hareentej22$ which pip Ys-MacBook-Air:~ hareentej22$ which pip2 /usr/local/bin/pip2 Ys-MacBook-Air:~ hareentej22$ – hareen tej Sep 16 '17 at 7:31
  • its showing nothing. – hareen tej Sep 16 '17 at 7:33
  • @klanomath sorry sir i could'nt understand you . but i followed trying to install opencv with miniconda by refering this tutorial . after running the code i get the following error File "demo1.py", line 3 print("OpenCV version:") ^ IndentationError: unexpected indent – hareen tej Sep 16 '17 at 19:19
1

This is a common stumbling block when editing shell files.

I would remove any .bashrc and .bash_profile entries you know you don't need and then get a package manager to help you with managing the bash requirements. There is step by step help and many questions here on how to get homebrew set up.

The benefits of homebrew is it makes some decisions about where alternative versions of python and packages live and you can not have to manage those as the software changes.

  • yes after a little bit of research i got to know that installing opencv via homebrew got so many benifits . and then i followed and reached some steps in this link . but when i run the command brew linkapps python' i only get 2 apps linked . and also even though i set the path as PATH=/usr/local/bin:$PATH in bash profile , when i run command which python` i get /usr/bin/python – hareen tej Sep 17 '17 at 18:30
-2

i solved it by just emptying the bash_profile and save an empty bash_profile . then after you wont see that second line whenever you open the terminal .

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .