Importing python modules in descent mode

I have a flash application running on openshift

and I am trying to import a module requests

into a program. I added dependencies in requirements.txt

as stated here .

My requirements.txt contains the following entries.

Flask==0.10.1
Requests=2.6.0

      

I got 500: Internal Server Error and afterwards rhc tail

I get

ImportError: no module names with requests

Am I missing something?

Update . There was an error in require.txt. == and not =.

The correct version of the .txt requirement should look like this.

Flask==0.10.1
Requests==2.6.0

      

However I am still facing the problem because of git push

my log states.

remote: Could not find version that meets 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 0.2, 0 , 2.0, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.3, 0.3, 0.3, 0.3.3, 0.3 , 4, 0.4, 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 ...

Alternative solution . You can use SSH for your application and you can manually install the package using pip as mentioned in this thread .

+3


source to share


1 answer


You must put two equal signs:

Flask==0.10.1
Requests==2.5.1

      

or

Requests>=2.5.1

      



or as @Paco suggested,

Requests 

      

Note. It is generally a bad idea to add a package without a release number. If a newer version is released and this release breaks compatibility, the next time you start it (directly or when you create a project), it might break everything.

+2


source







All Articles