ImportError: No module named docker

#1

hello,
I have to reinstall my computer (ubuntu 18.10, new motherboard and new cpu for better performance), and have some problem to launch WebODM.
I’ve tried several configurations (python 3.7, 2.7 … ).
Now I’ve got this error when I start webodm.sh :

erik@Balrog:~/WebODM$ sudo -H ./webodm.sh restart
Checking for docker...   OK
Checking for git...   OK
Checking for python...   OK
Checking for pip...   OK
Checking for docker-compose...   OK
Restarting WebODM...
docker-compose -f docker-compose.yml -f docker-compose.nodeodm.yml down --remove-orphans
Traceback (most recent call last):
  File "/usr/local/bin/docker-compose", line 6, in <module>
    from compose.cli.main import main
  File "/usr/local/lib/python2.7/dist-packages/compose/cli/main.py", line 17, in <module>
    import docker
ImportError: No module named docker
erik@Balrog:~/WebODM$ python --version
Python 2.7.15+

could you please advise how can I correct this issue ?
Docker has been installed anyway.
I’m using docker version, I’ve installed the native version too (with a script for ubuntu 16 version), but I’ve got some problem too;
Eric
ps : thank you for ODM / WebODM, I’ve used it with my laptop it s very fantastic (but I’ve not enough RAM / CPU, so I 've installed on another computer)

0 Likes

#2

Hello,
below are additional info about my docker info

erik@Balrog:~/WebODM$ docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 18.06.1-ce
Storage Driver: aufs
Root Dir: /var/snap/docker/common/var-lib-docker/aufs
Backing Filesystem: extfs
Dirs: 0
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 468a545b9edcd5932818eb9de8e72413e616e86e
runc version: N/A (expected: 69663f0bd4b60df09991c08812a60108003fa340)
init version: 949e6fa (expected: fec3683)
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.18.0-16-generic
Operating System: Ubuntu Core 16
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 7.781GiB
Name: Balrog
ID: (I can give you the ID if necessary)
Docker Root Dir: /var/snap/docker/common/var-lib-docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 22
Goroutines: 43
System Time: 2019-04-03T17:41:31.457938276+02:00
EventsListeners: 0
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

WARNING: No swap limit support
erik@Balrog:~/WebODM$

I’ve tested the “docker-compose” command (installed from ubuntu package I think), I’ve had the “no module name docker” issue (so this problem is notre frome webodm script, good :wink: )

erik@Balrog:~/WebODM$ docker-compose version
Traceback (most recent call last):
File “/usr/local/bin/docker-compose”, line 6, in
from compose.cli.main import main
File “/usr/local/lib/python2.7/dist-packages/compose/cli/main.py”, line 17, in
import docker
ImportError: No module named docker
erik@Balrog:~/WebODM$

So i’ve installed python-docker (from ubuntu package), now I’ve the “ImportError: No module named backports.ssl_match_hostname” issue.
This one habe been corrected by this installation :

sudo pip install backports.ssl_match_hostname

Now, it’s downloading the nodeodm, so it seems to be ok :slight_smile:

1 Like