As someone already suggested, you should not have:

sys.path = ['/usr/lib/python2.7', '/usr/local/lib/python2.7']

This is overriding sys.path in its entirety. One of the directories you have 
lost is where the C extension modules, including the time module, are located.

> On 1 Apr 2019, at 11:21 pm, shailesh...@gmail.com wrote:
> 
> Hello,
> 
> I am new to this domain, I have a flask application that is serving through 
> Apache/mod_wsgi and running on a Docker container which is running on AWS-EC2 
> Ubuntu 16.04 server instance. I get an error stating "ImportError: No module 
> named time" when I start the server. I have given all the details of the code 
> in this stack overflow question:
> 
> https://stackoverflow.com/questions/55375127/importerror-no-module-named-time-while-using-mod-wsgi-on-docker-container
>  
> <https://stackoverflow.com/questions/55375127/importerror-no-module-named-time-while-using-mod-wsgi-on-docker-container>
> 
> Could you please help me, any suggestion would be greatly appreciated. 
> 
> Looking forward to hearing back from you.
> 
> Regards,
> Shailesh 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to modwsgi+unsubscr...@googlegroups.com 
> <mailto:modwsgi+unsubscr...@googlegroups.com>.
> To post to this group, send email to modwsgi@googlegroups.com 
> <mailto:modwsgi@googlegroups.com>.
> Visit this group at https://groups.google.com/group/modwsgi 
> <https://groups.google.com/group/modwsgi>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to modwsgi+unsubscr...@googlegroups.com.
To post to this group, send email to modwsgi@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to