flask - importing python modules in openshift -


i have flask application running on openshift , trying import requests module in program. have added dependencies in requirements.txt stated here.

my requirements.txt contains following entries.

flask==0.10.1 requests=2.6.0 

i got 500 : internal server error , upon rhc tail getting

importerror: no module named requests

am missing ?

update : there mistake in requirements.txt == , not =.

correct version of requirements.txt should this.

flask==0.10.1 requests==2.6.0 

however still facing problem because on git push log states.

remote: not find version satisfies requirement requests==2.6.0 (from -r /var/lib/openshift/xxxxxxxxxxxxxxxxxxx/app-root/runtime/repo/requirements.txt (line 2)) (from versions: 0.10.0, 0.10.1, 0.10.2, 0.10.3, 0.10.4, 0.10.6, 0.10.7, 0.10.8, 0.11.1, 0.11.2, 0.12.0, 0.12.1, 0.13.0, 0.13.1, 0.13.2, 0.13.3, 0.13.4, 0.13.5, 0.13.6, 0.13.7, 0.13.8, 0.13.9, 0.14.0, 0.14.1, 0.14.2, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.4.0, 0.4.1, 0.5.0, 0.5.1, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.6.6, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.7.4, 0.7.5, 0.7.6, 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.8.4, 0.8.5, 0.8.6, 0.8.7, 0.8.8, 0.8.9, 0.9.0, 0.9.1, 0.9.2, 0.9.3, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.1.0, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 2.0.0, 2.0.1, 2.1.0, 2.2.0, 2.2.1, 2.3.0, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.5.0, 2.5.1) remote: cleaning up...

alternate solution: can ssh application , can manually install package using pip answered in thread.

you should put 2 equal signs:

flask==0.10.1 requests==2.5.1 

or

requests>=2.5.1 

or, @paco suggested,

requests  

note: bad idea add package without release number. if newer version released , release breaks compatibility, next time run (directly or when building project), might break everything.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -