Closed TirelessTinkerer closed 6 years ago
Same case with me! It would be great if someone could help.
It's likely a dynamic library required for opencv2 is missing. This Dockerfile might be helpful in that regard. I think this line might fix it https://github.com/udacity/CarND-Term1-Starter-Kit/blob/master/Dockerfile.cpu#L17, not 100% sure though.
@game-of-drones Found the solution to our problem.
PROBLEM: The reason this was happening was that I had set the PYTHONPATH variable on Ubuntu for some other software in the past. The way Anaconda environments work is that they hard link everything that is installed into the environment. Thus each environment is a completely separate installation of Python and all the packages. By using hard links, this is done efficiently. Thus, there's no need to mess with PYTHONPATH because the Python binary in the environment already searches the site-packages in the environment, and the lib of the environment, and so on.
By setting the PYTHONPATH environment variable we interfere with Anaconda's natural behavior thus forcing it to look for libraries in the paths defined by the PYTHONPATH which is generally set to your local machine paths and not the environment paths.
SOLUTION: Best thing to do would be to go to your .bashrc file and comment/remove the lines that set a PYTHONPATH. However, if you don't want to do that you can always do "unset PYTHONPATH" before activating an environment and everything will work like a charm.
Hope this helps.
Closing this since it sounds like it's solved for everyone.
I'm following the CarND to run this test. My system is linux mint 18 (basically the same as Ubuntu16.06), installed Anaconda3-4.3.0-Linux-x86_64.sh
From CarND-Term1-Starter-Kit, in created the environment with command:
After activating the environment and loading the notebook, I ran the cells and got the following error after
import cv2
Can someone help me out from this?