Selasa, 25 Desember 2018

cv2 (opencv-python) not working (Python on Visual Studio Code)

Problem 1: cv2 (opencv-python) not working (Python on Visual Studio Code)

Solution: 
1. Install the cv2 package with pip3 install --upgrade opencv-python
2. OR,  pip install --upgrade opencv-python
3. OR, If you're using a virtual or conda environment then use Python: Create Terminal and install cv2 either using conda or python -m pip install --upgrade opencv-python.
 
Reference issue: 
1. https://github.com/Microsoft/vscode-python/issues/1993
2. https://github.com/DonJayamanne/pythonVSCode/issues/623



Problem 2: cv2 module members are not recognized (Python on Visual Studio Code)

Solution: 
1. Use the Cmd+shift+p shortcut (or ctrl instead of cmd) and type "open settings (json)". 
2. Add this line to the settings: "python.linting.pylintArgs": ["--extension-pkg-whitelist=cv2"]

Reference Issue: 
1. https://github.com/PyCQA/pylint/issues/2426
2. https://github.com/DonJayamanne/pythonVSCode/issues/623 









Cara mengetahui ip address raspberry atau perangkat lain yg terhubung pada wifi yg sama

1. Install nmap [jika belum ada]: sudo apt install nmap 2. Cek ip address komputer (yg akses ke wifi yang sama): ip addr misal hasilnya 192....