Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: No module named 'requests' #2

Open
manishlamichhane opened this issue Feb 23, 2017 · 2 comments
Open

ImportError: No module named 'requests' #2

manishlamichhane opened this issue Feb 23, 2017 · 2 comments

Comments

@manishlamichhane
Copy link

manishlamichhane commented Feb 23, 2017

In the section "Taking Advantage of existing images" (Page 88), the build stops in 3rd layer with the error message:

Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7efbf75dfb00>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/flask

P.S. It turns out to be the issue of how docker handles pip install command. And solution is to edit docker config with appropriate DNS. But my version of docker already has the DNS configured. But still it is not working.

P.P.S Turns out it has something to do with the country I am in. I used a vpn bypass and now its working :).

@jacksontong
Copy link

I have the same import error for requests, but not sure what is my problem

dnmonster_1 |
dnmonster_1 | > [email protected] start /usr/src/app
dnmonster_1 | > node server.js
dnmonster_1 |
dnmonster_1 | dnmonster listening at http://:::8080
identidock_1 | Traceback (most recent call last):
identidock_1 | File "identidock.py", line 2, in
identidock_1 | import requests
identidock_1 | ImportError: No module named 'requests'

if I run from the command line I don't have this error

docker run -d --name dnmonster amouat/dnmonster:1.0
docker run -d -p 5000:5000 -e "ENV=DEV" --link dnmonster:dnmonster identidock

my docker version

Client:
 Version:      17.03.0-ce
 API version:  1.26
 Go version:   go1.7.5
 Git commit:   60ccb22
 Built:        Thu Feb 23 10:40:59 2017
 OS/Arch:      darwin/amd64

Server:
 Version:      17.03.0-ce
 API version:  1.26 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   3a232c8
 Built:        Tue Feb 28 07:52:04 2017
 OS/Arch:      linux/amd64
 Experimental: true

@lgmg
Copy link

lgmg commented Mar 21, 2017

I have the same problem. I could solve this problem by rebuilding the service identidock
docker-compose build identidock
docker-compose up -d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants