Hi all,
Operating System:
I am working on a cluster of 3 machines AWS ubuntu 14.04 and Python2.7.
I am following the official site for installation and running the code for distributed training.
When I execute this:
../../tools/launch.py -n 2 -H hosts --sync-dst-dir /tmp/mxnet \
python train_mnist.py --network lenet --kv-store dist_sync
This is the error:
Traceback (most recent call last):
File "train_mnist.py", line 10, in
from common import find_mxnet, fit
File "/tmp/mxnet/common/find_mxnet.py", line 4, in
import mxnet as mx
File "/tmp/mxnet/mxnet/__init__.py", line 7, in
from .base import MXNetError
File "/tmp/mxnet/mxnet/base.py", line 46, in
_LIB = _load_lib()
File "/tmp/mxnet/mxnet/base.py", line 38, in _load_lib
lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_GLOBAL)
File "/usr/lib/python2.7/ctypes/__init__.py", line 365, in __init__
self._handle = _dlopen(self._name, mode)
OSError: libcblas.so.3: cannot open shared object file: No such file or directory
Traceback (most recent call last):
File "train_mnist.py", line 10, in
from common import find_mxnet, fit
File "/tmp/mxnet/common/find_mxnet.py", line 4, in
import mxnet as mx
File "/tmp/mxnet/mxnet/__init__.py", line 7, in
from .base import MXNetError
File "/tmp/mxnet/mxnet/base.py", line 46, in
_LIB = _load_lib()
File "/tmp/mxnet/mxnet/base.py", line 38, in _load_lib
lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_GLOBAL)
File "/usr/lib/python2.7/ctypes/__init__.py", line 365, in __init__
self._handle = _dlopen(self._name, mode)
OSError: libcblas.so.3: cannot open shared object file: No such file or directory
Any Idea?
To solve this issue you have to install libatlas-base-dev
sudo apt-get install libatlas-base-dev
This issue is closed due to lack of activity in the last 90 days. Feel free to ping me to reopen if this is still an active issue. Thanks!
Using OS - "Linux ip-172-31-7-81 4.9.76-3.78.amzn1.x86_64" and python 2.7.
Tried -
import mxnet as mx
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/site-packages/mxnet/__init__.py", line 25, in
from . import engine
File "/usr/local/lib/python2.7/site-packages/mxnet/engine.py", line 23, in
from .base import _LIB, check_call
File "/usr/local/lib/python2.7/site-packages/mxnet/base.py", line 111, in
_LIB = _load_lib()
File "/usr/local/lib/python2.7/site-packages/mxnet/base.py", line 103, in _load_lib
lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_LOCAL)
File "/usr/lib64/python2.7/ctypes/__init__.py", line 357, in __init__
self._handle = _dlopen(self._name, mode)
OSError: libgfortran.so.3: cannot open shared object file: No such file or directory
[ec2-user@ip-172-31-7-81 ~]$ sudo yum install libatlas-base-dev
Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main | 2.1 kB 00:00:00
amzn-updates | 2.5 kB 00:00:00
No package libatlas-base-dev available.
Error: Nothing to do
But not able to use mxnet on this instance.
@anirudhacharya for missing libgfortran.so.3
you need gfortran package instead of atlas.
@szha yum does not have gfortran just like libatlas-base-dev.
$ sudo yum install gfortran
Loaded plugins: priorities, update-motd, upgrade-helper
No package gfortran available.
Error: Nothing to do
yum
has a subcommand to help you find the file you need, yum provides libgfortran.so.3
. The output tells you which package to install.
@szha
$ yum provides libgfortran.so.3
Loaded plugins: priorities, update-motd, upgrade-helper
libgfortran-4.4.6-4.81.amzn1.i686 : Fortran runtime
Repo : amzn-main
Matched from:
Provides : libgfortran.so.3
libgfortran-4.8.5-11.135.amzn1.i686 : Fortran runtime
Repo : amzn-main
Matched from:
Provides : libgfortran.so.3
libgfortran-6.4.1-1.45.amzn1.i686 : Fortran runtime
Repo : amzn-main
Matched from:
Provides : libgfortran.so.3
libgfortran-6.4.1-1.45.amzn1.i686 : Fortran runtime
Repo : @amzn-main
Matched from:
Provides : libgfortran.so.3
I installed the above package -
$ sudo yum install libgfortran-6.4.1-1.45.amzn1.i686
But when I try to import mxnet it still gives the same error -
import mxnet as mx
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/site-packages/mxnet/__init__.py", line 25, in
from . import engine
File "/usr/local/lib/python2.7/site-packages/mxnet/engine.py", line 23, in
from .base import _LIB, check_call
File "/usr/local/lib/python2.7/site-packages/mxnet/base.py", line 111, in
_LIB = _load_lib()
File "/usr/local/lib/python2.7/site-packages/mxnet/base.py", line 103, in _load_lib
lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_LOCAL)
File "/usr/lib64/python2.7/ctypes/__init__.py", line 357, in __init__
self._handle = _dlopen(self._name, mode)
OSError: libgfortran.so.3: cannot open shared object file: No such file or directory
Also for the following packages, I am not able to find corresponding yum packages - liblapack-dev, liblas-dev, gfortran. I could usually install these packages with apt-get but yum is not able to find them.
$ sudo yum provides liblapack-dev
Loaded plugins: priorities, update-motd, upgrade-helper
No matches found
$ sudo yum provides liblas-dev
Loaded plugins: priorities, update-motd, upgrade-helper
No matches found
$ sudo yum provides gfortran
Loaded plugins: priorities, update-motd, upgrade-helper
No matches found
The AMI images of AWS does not have these packages. Installing them worked.
sudo yum -y install gcc-c++
sudo yum -y install gcc-gfortran
sudo yum -y install blas
sudo yum -y install lapack
sudo yum -y install atlas-sse3-devel
Thanks.
In Ubuntu 18.04, the following error:
sander: error while loading shared libraries: libgfortran.so.3: cannot open shared object file: No such file or directory
was fixed by running
sudo apt-get install libgfortran3:amd64
Also, in place of amd64 the I am aware of the following options: i386, i586, i686, x86_64.
Most helpful comment
To solve this issue you have to install libatlas-base-dev
sudo apt-get install libatlas-base-dev