Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Install: DLL load failed while importing cv2 #166

Open
gabyecarpenter opened this issue Nov 6, 2024 · 4 comments
Open

New Install: DLL load failed while importing cv2 #166

gabyecarpenter opened this issue Nov 6, 2024 · 4 comments

Comments

@gabyecarpenter
Copy link

Hello! Our computer that we used for TagLab recently crashed (sigh), but it is up and running an I am re-installing TagLab. Previously, we had a lot of issues with TagLab/python dependencies and the software crashing when using certain tools. To fix this, I installed Python 3.9 and used the conda environment. This time, I saw that the documentation recommends Python 3.11 (and the install did not work with Python 3.9). I have downloaded the most recent TagLab version from github, python 3.11.9, and have CUDA version 12.5 (running Windows 11). All the dependencies installed almost perfectly (just needed to update pip) and it shows that all requirements are satisfied in the install. When I open TagLab I get this error. Any help would be appreciated. Thank you!
image

@maxcorsini
Copy link
Member

It seems that OpenCV package has not been installed. Are you sure that during the installation all goes well ? Try the latest release (11th of November) and let us know.

@gabyecarpenter
Copy link
Author

The first thing I did when I got this error was install OpenCV and that did not fix the problem. After more debugging I realized that visual studio may not have been installed on the machine. I uninstalled everything (python and taglab) and started from the beginning. Unfortunately, I am still coming up with this error. I went through to check the installations of all the dependencies and everything appears to be installed. Example of how I checked all dependencies, showing the open-cv install
image

I am not totally sure what to try from here...

@Jordan-Pierce
Copy link
Contributor

Jordan-Pierce commented Nov 7, 2024

@gabyecarpenter you should try installing everything in a virtual environment, like conda. Installing everything in your base python environment is always tricky.

  • Install Miniconda
  • Open anaconda terminal
  • Create a conda environment by doing the following:
conda create --name taglab11 python=3.11 -y
conda activate taglab11
python install.py

If you still have issues with opencv try installing within conda:

conda install -c conda-froge opencv
python install.py

@benfarmer05
Copy link

@Jordan-Pierce On the same machine, I followed your advice with installing through a conda environment, and still ran into the same issue. This obscure DLL-related error appeared to be the issue for our machine running Windows 11 with latest updates: https://stackoverflow.com/questions/43184887/dll-load-failed-error-when-importing-cv2

What worked was enabling "Media Feature Pack" in the optional features area of Settings on Windows, and then restarting and trying again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants