0

I am new to using docker containers. I have successfully created a new docker container but am now having trouble installing and then using python modules in it.

I entered into the already running container with the following command:

$docker exec -it lizzie /bin/bash

This worked. I also managed to install the module of interest to me with the following command:

$pip install pysnmp

I cloned my git repository, entered the local repo, and attempted to run a script that utilized the module pysnmp. The following error was returned:

ImportError: No module named pysnmp

I reinstalled the module to ensure that it had installed correctly; all requirements were already satisfied. The two folders currently in the docker are a folder called "anaconda-ks.cfg" which I can't enter and the repo. I feel like this has something to do with the path the module was installed in but I'm not sure where I should be installing it or how to do so. Thanks in advance for the help!

Liz W.
  • 35
  • 7
  • 1
    I'm not familiar with Anaconda, but I think `anaconda-ks.cfg` has to be file, not a directory. Can you add your `Dockerfile` to the question? – Igor Nikolaev Mar 13 '19 at 18:39
  • Oh! Right that is a file. I'm not familiar with a Dockerfile--where would I find it? – Liz W. Mar 13 '19 at 19:59
  • `Dockerfile` is what defines any Docker image. How did you run your container? Did you use some existing image? – Igor Nikolaev Mar 14 '19 at 08:59
  • Sorry for the late reply, thanks for your help--I ended up finding a completely different work around to my issue that had nothing to do with docker containers. – Liz W. Mar 19 '19 at 18:26

0 Answers0