Posts

Showing posts from December, 2020

No module named imutils.pespective after pip installing

/python/Script/   1) Install   imutils pip install imutils 2) If imutils is already installed, check the installation path. Requirement already satisfied: imutils in /usr/local/lib/python3 .5 /dist-packages 3) When I ran python program, I ran into following error: ImportError: No module named imutils.video In my case, imutils was only installed under /usr/local/lib/python3.5/dist-packages path, once I copied this folder to  /usr/local/lib/python2.7/dist-packages , it worked! Hope this is helpful.

Cannot find module cv2 when using OpenCV

/python/Script/   First do run these commands inside Terminal/CMD: conda update anaconda-navigator conda update navigator-updater Then the issue for the instruction below will be resolved For windows if you have anaconda installed, you can simply do pip install opencv-python or conda install -c https://conda.binstar.org/menpo opencv if you are on linux you can do : pip install opencv-python or conda install opencv Link1   Link2 For python3.5+ check these links :  Link3  ,  Link4 Update: if you use anaconda, you may simply use this as well (and hence don't need to add menpo channel): conda install -c conda-forge opencv

Installing Numpy on Windows

Open Windows command prompt with administrator privileges  (quick method: Press the Windows key. Type "cmd". Right-click on the suggested "Command Prompt" and select "Run as Administrator) Navigate to the Python installation directory's Scripts folder using the "cd" (change directory) command. e.g. "cd C:\Program Files (x86)\PythonXX\Scripts" This might be:  C:\Users\\AppData\Local\Programs\Python\PythonXX\Scripts  or  C:\Program Files (x86)\PythonXX\Scripts  (where XX represents the Python version number), depending on where it was installed. It may be easier to find the folder using Windows explorer, and then paste or type the address from the Explorer address bar into the command prompt. Enter the following command: "pip install numpy". You should see something similar to the following text appear as the package is downloaded and installed. Collecting numpy Downloading numpy -1.13 .3 -2 -cp27-none-win32.whl ( 6.7 MB) 1