It seems that I have several version of python installed on same computer, one from them being the anaconda
distribution. However certain packages can be imported only with certain version of python. How can we merge all the source of packages:
I succesfully installed opencv and try to import it in a script from Atom
with the command import cv2
(1):
ImportError: dlopen(/anaconda3/lib/python3.6/site-packages/cv2.so, 2): Library not loaded: /usr/local/opt/ilmbase/lib/libImath-2_2.12.dylib
Referenced from: /usr/local/Cellar/opencv/3.4.1_4/lib/libopencv_imgcodecs.3.4.dylib
Reason: image not found
Importing with command python
(the one linked to anaconda
)
I went then to the Terminal
and called python with $ python
Python 3.6.5 | packaged by conda-forge | (default, Apr 6 2018, 13undefined09)
GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53) on darwin
I then tried to import open cv with import cv2
and got the same error message as in (1) above
Importing with command python3
I then entered import python3
(instead of python
), it worked: I got:
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 03undefined55) GCC 4.2.1 (Apple
Inc. build 5666) (dot 3) on darwin
And could execute a script with import cv2
apparently those 2 different command fetch the package from different locations because:$ which python
get me /anaconda3/bin/python
and $ which python3
gets me /Library/Frameworks/Python.framework/Versions/3.6/bin/python3
As I use Atom as text editor, how can I make Atom to look at the correct place?
Many thanks in advance!
Specifications:
- macOS 10.14
- Python 3.6.5