hello, please help here when I succeed to run jobs when I run my python script that I actually created from my jupyter notebook it actually gives me an error that it cannot import cv2 using python 3(intel update 2). please if someone can help
- General Support
There is some lack of clarity in your question. What we could understand is that you are able to "import cv2" from your jupyter notebook but the import fails in the terminal or during job submission. Please correct us if we got this wrong.
Could you also provide us with the python path you are using in terminal as well as in jupyter notebook
You can check the python path that is being used in jupyter notebook using the below python code.
import sys sys.executable
To check python path used in terminal use the below command
For the python which shows the "cannot import cv2 " error you could install cv2 using the below command
pip install opencv-python
hello this is the error i am getting after doing the above command
ERROR: Could not install packages due to an EnvironmentError: [Errno 30] Read-only file system: '/glob/development-tools/versions/oneapi/beta05/inteloneapi/intelpython/latest/lib/python3.7/site-packages/cv2'
This is because you are trying to install to the package to the python present in /glob. This python is common to all devcloud users. You should be using --user flag to install the package specific only to your user
pip install opencv-python --user
Hope this helps