says cv2 package not found even though I ran pip install requirements.txt in my terminal prior. Note that this error showed up when I used the virtual environment method (method 1), but not with the Docker method (method 2).
hi @chengyineng , can you give more information about which OS you are using and the output of the following command?
conda env list and
And make sure you do activate the environment by
conda activate mlep-w1-lab .
I only checked it on Linux and it works flawlessly.
Having the same issue getting error below. I did followed all steps in the instruction and made sure I activated the env and pip installed the requirement.txt.
ModuleNotFoundError Traceback (most recent call last)
----> 1 import cvlib
ModuleNotFoundError: No module named ‘cvlib’"
output from conda env list:
mlep-w1-lab * /Users/mc/opt/anaconda3/envs/mlep-w1-lab
output from pip freeze:
hi @morrischen2008 , for the result of
pip freeze and
conda env list I see all the packages are in place. I’m not sure why you cannot import the module.
Can you use docker instead? When you import the module, there seem some error occurred, did you see some hints about the cause from the error message?
Looks like you’re using a Mac, I tried on my Intel Macbook Pro and cannot get the same error.
Thanks! I still cannot figure out why using conda (method 1), importing cvlib fails. But using docker (method 2), cvlib can be imported successfully.
sorry cannot help you here.
From the environment list, I see you have mixed miniconda and anaconda installed. And the paths to each environment are different.
I am not sure this is a solution but you can try to uninstall all the miniconda and anaconda, clear the path in
.bash_profile, then try to install anaconda again.
No worries and thanks for your advice! I will try clear things up as you suggested when I revisit this homework later.
I have the same issue on Windows. I probably have both Miniconda and Anaconda installed as you mentioned.
I re-installed Anaconda and that did not fix it. But I had been opening Jupyter using a different method instead of typing jupyter lab at the Anaconda prompt like the instructions say. When I opened Jupyter using the instructions, cvlib loaded.
Thanks, this worked for me.