Thanks for posting in Intel communities.
1. To create an environment:
conda create -n <env name> python=3.9
2. Activate the new environment:
conda activate <env_name>
3. Install opencv
pip3 install --user opencv-python
If this resolves your issue, make sure to accept this as a solution. This would help others with similar issues.
We are able to install openCV using pip3 without any issues. If you are using pip it will show bad interpreter error.
Could you please confirm whether you are using pip3 or pip for the installation.
I'm able to install opencv-python package using pip3 approach
However, what I need is OpenCV for C++ (https://www.geeksforgeeks.org/how-to-install-opencv-in-c-on-linux/)
because I need to compile my host code for my openCL FPGA
Makefile screenshot is as follow:
Sorry for the inconvenience, User's don't have admin/sudo privileges in Intel DevCloud to install custom packages. Intel DevCloud® is a shared environment which comes with pre-installed validated Intel® oneAPI software and complimentary packages. As a policy we don't install custom (open source or 3rd party licensed) software to the environment and recommend that you explore available and equivalent oneAPI SW tools or components.
OpenCV does not fall under the scope of oneAPI DevCloud. As such we will not install it.
oneAPI DevCloud users have the opportunity to build it from source.
There are various get started guides available online.
Please follow the below commands :
$ git clone https://github.com/opencv/opencv.git $ cd opencv $ mkdir build $ cd build $ cmake -D INSTALL_PYTHON_EXAMPLES=ON -D INSTALL_C_EXAMPLES=ON .. $ make -j$(nproc)
For more information please refer OpenCV official pages: https://docs.opencv.org/4.x/d7/d9f/tutorial_linux_install.html
We assume that your issue is resolved.
If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.