2

I have reqirements.txt that has the line numpy. I run the following command to download the dependencies:

pip install --download vendor -r requirements.txt

This downloads all dependencies to the vendor folder and one of the file name is: numpy-1.13.0-cp27-cp27mu-manylinux1_x86_64.whl

But when I cf push my application using the downloaded dependencies in the vendor folder, I get an error below:

Could not find a version that satisfies the requirement numpy (from -r requirements.txt (line 3)) (from versions: )

Is there a way to resolve this? I believe this is happening because of the difference in the way the numpy file is named in vendor directory and the requirements.txt file.

My requirements.txt file contains the following:

flask-restful
Flask
numpy
Pillow==2.7.0
argparse==1.2.1
requests==2.5.1
boto3
boto
six==1.10.0
scikit-image

The error happens only on numpy and scikit-image. Other dependencies go ok.

This question is related to how to download pip dependencies locally?

Anthony
  • 33,838
  • 42
  • 169
  • 278
  • How are you pointing your code to use the `vendor` folder? – Alastair McCormack Jun 28 '17 at 17:09
  • That is dealt with cloudfoundry. The environment I use to deploy my application. But this is how they do it: https://github.com/cloudfoundry/python-buildpack/blob/master/bin/steps/pip-install#L18 My application has a `vendor` folder that contains all the downloaded dependencies. – Anthony Jun 28 '17 at 17:10
  • So is this when you try to `cf push` the app that you get the error? *"run"* is a little unclear. – jonrsharpe Jun 28 '17 at 17:13
  • Sorry, yes. I get that error when I `cf push`. I was trying to make the question platform agnostic. – Anthony Jun 28 '17 at 17:14
  • You might look at using miniconda instead. It makes using things like numpy and scikit easier & the Python Build pack on Cloud Foundry supports it. http://docs.cloudfoundry.org/buildpacks/python/#miniconda – Daniel Mikusa Jun 29 '17 at 15:53

0 Answers0