cloudfoundry / python-buildpack

Cloud Foundry buildpack for the Python Language
http://docs.cloudfoundry.org/buildpacks/
Apache License 2.0
121 stars 279 forks source link

Python Buildpack Can't Install Cython #159

Closed marothstein closed 4 years ago

marothstein commented 4 years ago

What version of Cloud Foundry and CF CLI are you using? (i.e. What is the output of running cf curl /v2/info && cf version?

cf curl /v2/info
{
   "name": "Pivotal Application Service",
   "build": "2.7.3-build.11",
   "support": "https://support.pivotal.io",
   "version": 0,
   "description": "https://docs.pivotal.io/pivotalcf/2-7/pcf-release-notes/runtime-rn.html",
   "authorization_endpoint": "https://login.sys.mydomain.com",
   "token_endpoint": "https://uaa.sys.mydomain.com",
   "min_cli_version": "6.23.0",
   "min_recommended_cli_version": "6.23.0",
   "app_ssh_endpoint": "ssh.sys.mydomain.com:2222",
   "app_ssh_host_key_fingerprint": "FINGERPRINT",
   "app_ssh_oauth_client": "ssh-proxy",
   "doppler_logging_endpoint": "wss://doppler.sys.mydomain.com:443",
   "api_version": "2.139.0",
   "osbapi_version": "2.15",
   "routing_endpoint": "https://mydomain.com/routing"
}

cf version
cf version 6.43.0+815ea2f3d.2019-02-20

What version of the buildpack you are using?

python_buildpack-cached-cflinuxfs3-v1.6.37.zip

If you were attempting to accomplish a task, what was it you were attempting to do?

Deploy a Flask app.

What did you expect to happen?

I expected the app to install the necessary dependencies, deploy, and launch.

What was the actual behavior?

The process failed on installing cython.

What was your error message?

Collecting cython (from -r /tmp/app/requirements.txt (line 5))
            Could not find a version that satisfies the requirement cython (from -r /tmp/app/requirements.txt (line 5)) (from versions: )
          No matching distribution found for cython (from -r /tmp/app/requirements.txt (line 5))

How are you building and caching your dependencies?

I'm building them inside a Docker container built with image cloudfoundry/cflinuxfs3:0.99.0.

The Dockerfile runs the following commands:

RUN apt-get update -y
RUN apt-get install -y python3.7 python3-pip build-essential

COPY requirements.txt requirements.txt

RUN pip3 download -r requirements.txt --no-binary=:none: -d vendor
RUN pip3 install -r requirements.txt

What does your requirements.txt file look like?

# Flask
Flask==1.0.2

# Other
cython
numpy
xgboost
sklearn

What dependencies do you have in your /app/vendor directory?

Click-7.0-py2.py3-none-any.whl
Click-7.0.tar.gz
Cython-0.29.14-cp36-cp36m-manylinux1_x86_64.whl
Cython-0.29.14-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Flask-1.0.2-py2.py3-none-any.whl
Flask-1.0.2.tar.gz
Jinja2-2.10.3.tar.gz
Jinja2-2.11.0-py2.py3-none-any.whl
MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl
MarkupSafe-1.1.1-cp37-cp37m-macosx_10_6_intel.whl
MarkupSafe-1.1.1.tar.gz
Werkzeug-0.16.1-py2.py3-none-any.whl
Werkzeug-0.16.1.tar.gz
certifi-2019.11.28-py2.py3-none-any.whl
certifi-2019.11.28.tar.gz
chardet-3.0.4-py2.py3-none-any.whl
chardet-3.0.4.tar.gz
idna-2.8-py2.py3-none-any.whl
idna-2.8.tar.gz
itsdangerous-1.1.0-py2.py3-none-any.whl
itsdangerous-1.1.0.tar.gz
numpy-1.18.1-cp36-cp36m-manylinux1_x86_64.whl
numpy-1.18.1-cp37-cp37m-macosx_10_9_x86_64.whl
numpy-1.18.1.zip
requests-2.22.0-py2.py3-none-any.whl
requests-2.22.0.tar.gz
scipy-1.4.1-cp36-cp36m-manylinux1_x86_64.whl
scipy-1.4.1-cp37-cp37m-macosx_10_6_intel.whl
setuptools-45.1.0.zip
urllib3-1.25.8-py2.py3-none-any.whl
urllib3-1.25.8.tar.gz
wheel-0.34.0-py2.py3-none-any.whl
wheel-0.34.0.tar.gz
xgboost-0.90-py2.py3-none-manylinux1_x86_64.whl
xgboost-0.90.tar.gz

Please confirm where necessary:

cf-gitbot commented 4 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/171002477

The labels on this github issue will be updated when the story is started.

marothstein commented 4 years ago

For reference, this does work in a local cflinux Docker container.

kvedurmu commented 4 years ago

Hi. I haven't been able to reproduce this with the latest version of the Python Buildpack. I was able to modify the requirements.txt file in this app to include cython and it pushed successfully. Could you provide more details or attach an app so we can look into this further?

ForestEckhardt commented 4 years ago

Closing due to inactivity. Please feel free to reopen if you have an update or more to discuss.