Pip install on Mac OS gets error: command ‘/usr/bin/clang’ failed with exit code 1

Try to add these env var before If it does not work you can try with virtualenv: Because is written on github: Install this library in a virtualenv using pip. virtualenv is a tool to create isolated Python environments. The basic problem it addresses is one of dependencies and versions, and indirectly permissions. With virtualenv, it’s … Read more

Why would cv2.COLOR_RGB2GRAY and cv2.COLOR_BGR2GRAY give different results?

RGB->gray conversion actually isn’t an average — different channels are weighed differently. Specifically: This is also mentioned in the documentation. Thus, it’s expected that RGB2GRAY and BGR2GRAY give different results. Regarding the discrepancy between sum-then-divide and divide-then-sum approaches, i.e. between and Recall that cv2.imread returns a uint8 numpy array. Thus, the latter operation (where all channels are combined … Read more

How do I remove/delete a virtualenv?

“The only way I can remove it seems to be: sudo rm -rf venv“ That’s it! There is no command for deleting your virtual environment. Simply deactivate it and rid your application of its artifacts by recursively removing it. Note that this is the same regardless of what kind of virtual environment you are using. virtualenv, venv, Anaconda … Read more

How do I create a popup window in tkinter?

I found 3 mistakes use Toplevel() instead of Tk() to create second/third window command= expects callback – function name without ()(but you use popupBonusWindow.destroy()) don’t mix pack() and grid() in one window or frame(but you use grid() and pack() in popup) But you can also use built-in messageboxes like showinfo() BTW: I put it on page: Tkinter: How to create popup Window or Messagebox

Virtualenv – workon command not found

So far it was working fine but I restarted the shell The reason is because you restarted the shell. If you want this to work with each shell, you’ll need to add these to your ~/.bashrc file: After adding this, you’ll want to source ~/.bashrc so the changes take effect. You’ll find that you have access to virtualenvwrapper facilities in each new … Read more

Dlib installation error?

Here is how I solved the same issue. Make sure you have installed cmake and CMAKE_FOLDER\bin added it in environment varaible Install anaconda then run following commands in anaconda shell. conda update conda conda update anaconda create new environment conda create -n env_dlib python=3.6 activate enviroment conda activate env_dlib install dlib conda install -c conda-forge dlib Verify your installation in … Read more