Closed mhadi813 closed 4 years ago
We have created an issue in Pivotal Tracker to manage this:
https://www.pivotaltracker.com/story/show/172829824
The labels on this github issue will be updated when the story is started.
tableau hyperAPI note about installation:
Linux installations require pip version 19.3 or newer. Note that pip versions 20.0 and 20.1 are not working because of issues with pip.
https://help.tableau.com/current/api/hyper_api/en-us/docs/hyper_api_installing.html#using-the-tableau-hyper-api-nuget-package
Alternatively, you can download the Python Hyper API package file (.whl file) for your operating system. See Hyper API - Products Release and Download.
• Use pip to install the .whl file you downloaded.
○ On Windows: Scripts\pip install [path_to_whl_file]
On Linux/macOS: bin/pip install [path_to_whl_file] ```
FYI, if you are interested in running a custom version of pip, there is a similar issue here: https://github.com/cloudfoundry/pip-cnb/issues/2
Thanks mhaas, I couldn't find solution how to install the requirement with specific version of pip.
As a work around, I used mini conda to install pip==19.3.1 and passed packages in environment.yml as below:
name: my_app
channels:
- defaults
dependencies:
- pip=19.3.1
- pip:
- pantab
- tableauserverclient
- google-cloud-bigquery==1.24.0
- google-cloud-storage==1.27.0
- pyarrow==0.16.0
- pandas==1.0.0
@mhadi813 Thanks a lot, that is a pretty cool trick! Do you know by any chance if the environment.yml
can be used to command-line arguments to pip
? I checked the conda docs, but couldn't find anything there.
I didn’t think so, environment.yml is for conda command. In this set up, Once conda has installed required version of python and pip, pip takes the driver seat and installs rest of the requirements listed in environment.yml
I am having some trouble reproducing this. I did the following with the latest buildpack (v1.7.17).
I have an application with the following source:
runtime.txt
python-3.7.x
requirements.txt
pantab
main.py
import pantab
print("successfully imported required package")
I then perform the following push command:
cf push myapp -p /tmp/myapp -b python_buildpack --health-check-type none -c "python main.py" --no-route
And I see the following in my logs:
2020-08-06T11:42:23.80-0400 [STG/0] OUT Downloading app package...
2020-08-06T11:42:23.83-0400 [STG/0] OUT Downloaded app package (516B)
2020-08-06T11:42:24.09-0400 [STG/0] OUT -----> Python Buildpack version 1.7.17
2020-08-06T11:42:24.09-0400 [STG/0] OUT -----> Supplying Python
2020-08-06T11:42:24.09-0400 [STG/0] OUT -----> Installing python 3.7.8
2020-08-06T11:42:24.09-0400 [STG/0] OUT Download [https://buildpacks.cloudfoundry.org/dependencies/python/python_3.7.8_linux_x64_cflinuxfs3_e98a931c.tgz]
2020-08-06T11:42:28.10-0400 [STG/0] OUT -----> Installing pip-pop 0.1.5
2020-08-06T11:42:28.10-0400 [STG/0] OUT Download [https://buildpacks.cloudfoundry.org/dependencies/manual-binaries/pip-pop/pip-pop-0.1.5-b32efe86.tar.gz]
2020-08-06T11:42:33.13-0400 [STG/0] OUT -----> Running Pip Install
2020-08-06T11:42:34.48-0400 [STG/0] OUT Collecting pantab
2020-08-06T11:42:35.10-0400 [STG/0] OUT Downloading pantab-1.1.0-cp37-cp37m-manylinux2014_x86_64.whl (3.7 MB)
2020-08-06T11:42:36.03-0400 [STG/0] OUT Collecting pandas
2020-08-06T11:42:36.04-0400 [STG/0] OUT Downloading pandas-1.1.0-cp37-cp37m-manylinux1_x86_64.whl (10.5 MB)
2020-08-06T11:42:37.43-0400 [STG/0] OUT Collecting tableauhyperapi
2020-08-06T11:42:37.98-0400 [STG/0] OUT Downloading tableauhyperapi-0.0.11249-py3-none-manylinux2014_x86_64.whl (48.0 MB)
2020-08-06T11:42:41.97-0400 [STG/0] OUT Collecting python-dateutil>=2.7.3
2020-08-06T11:42:41.99-0400 [STG/0] OUT Downloading python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
2020-08-06T11:42:42.71-0400 [STG/0] OUT Collecting numpy>=1.15.4
2020-08-06T11:42:42.73-0400 [STG/0] OUT Downloading numpy-1.19.1-cp37-cp37m-manylinux2010_x86_64.whl (14.5 MB)
2020-08-06T11:42:44.15-0400 [STG/0] OUT Collecting pytz>=2017.2
2020-08-06T11:42:44.17-0400 [STG/0] OUT Downloading pytz-2020.1-py2.py3-none-any.whl (510 kB)
2020-08-06T11:42:44.74-0400 [STG/0] OUT Collecting cffi<2,>=1.12.2
2020-08-06T11:42:44.75-0400 [STG/0] OUT Downloading cffi-1.14.1-cp37-cp37m-manylinux1_x86_64.whl (401 kB)
2020-08-06T11:42:44.86-0400 [STG/0] OUT Collecting six>=1.5
2020-08-06T11:42:44.87-0400 [STG/0] OUT Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
2020-08-06T11:42:44.92-0400 [STG/0] OUT Collecting pycparser
2020-08-06T11:42:44.94-0400 [STG/0] OUT Downloading pycparser-2.20-py2.py3-none-any.whl (112 kB)
2020-08-06T11:42:45.06-0400 [STG/0] OUT Installing collected packages: six, python-dateutil, numpy, pytz, pandas, pycparser, cffi, tableauhyperapi, pantab
2020-08-06T11:42:47.76-0400 [STG/0] ERR WARNING: The scripts f2py, f2py3 and f2py3.7 are installed in '/tmp/contents192244616/deps/0/python/bin' which is not on PATH.
2020-08-06T11:42:47.76-0400 [STG/0] ERR Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
2020-08-06T11:42:55.32-0400 [STG/0] OUT Successfully installed cffi-1.14.1 numpy-1.19.1 pandas-1.1.0 pantab-1.1.0 pycparser-2.20 python-dateutil-2.8.1 pytz-2020.1 six-1.15.0 tableauhyperapi-0.0.11249
2020-08-06T11:42:55.53-0400 [STG/0] ERR WARNING: You are using pip version 20.1.1; however, version 20.2.1 is available.
2020-08-06T11:42:55.53-0400 [STG/0] ERR You should consider upgrading via the '/tmp/contents192244616/deps/0/bin/python -m pip install --upgrade pip' command.
2020-08-06T11:42:56.44-0400 [STG/0] ERR No start command specified by buildpack or via Procfile.
2020-08-06T11:42:56.44-0400 [STG/0] ERR App will not start unless a command is provided at runtime.
2020-08-06T11:43:28.11-0400 [STG/0] OUT Exit status 0
2020-08-06T11:43:28.11-0400 [STG/0] OUT Uploading droplet, build artifacts cache...
2020-08-06T11:43:28.11-0400 [STG/0] OUT Uploading droplet...
2020-08-06T11:43:28.11-0400 [STG/0] OUT Uploading build artifacts cache...
2020-08-06T11:43:31.21-0400 [API/0] OUT Creating droplet for app with guid 1cbb2295-46c5-4be6-944b-f3624d5e2c6b
2020-08-06T11:43:31.59-0400 [STG/0] OUT Uploaded build artifacts cache (118.7M)
2020-08-06T11:43:36.78-0400 [STG/0] OUT Uploaded droplet (131.7M)
2020-08-06T11:43:36.80-0400 [STG/0] OUT Uploading complete
2020-08-06T11:43:36.97-0400 [STG/0] OUT Cell decdb167-c781-4a8c-95d2-27f35d7eadc3 stopping instance 03f829df-ad36-4b07-8ea1-47ad7dba1209
2020-08-06T11:43:36.97-0400 [STG/0] OUT Cell decdb167-c781-4a8c-95d2-27f35d7eadc3 destroying container for instance 03f829df-ad36-4b07-8ea1-47ad7dba1209
2020-08-06T11:43:37.24-0400 [CELL/0] OUT Cell decdb167-c781-4a8c-95d2-27f35d7eadc3 creating container for instance 560261b5-2ece-4937-57f0-a027
2020-08-06T11:43:38.36-0400 [STG/0] OUT Cell decdb167-c781-4a8c-95d2-27f35d7eadc3 successfully destroyed container for instance 03f829df-ad36-4b07-8ea1-47ad7dba1209
2020-08-06T11:43:38.53-0400 [CELL/0] OUT Cell decdb167-c781-4a8c-95d2-27f35d7eadc3 successfully created container for instance 560261b5-2ece-4937-57f0-a027
2020-08-06T11:43:38.75-0400 [CELL/0] OUT Downloading droplet...
2020-08-06T11:43:45.72-0400 [CELL/0] OUT Downloaded droplet (131.7M)
2020-08-06T11:43:46.68-0400 [APP/PROC/WEB/0] OUT successfully imported required package
2020-08-06T11:43:46.73-0400 [APP/PROC/WEB/0] OUT Exit status 0
This looks pretty successful. I'm not sure what I am missing.
Closing this due to inactivity. Feel free to open this back up if you have more details.
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
?What version of the buildpack you are using?
Python Buildpack version 1.7.13
If you were attempting to accomplish a task, what was it you were attempting to do? deploy an app for which requirements includes pantab (which requires tableauhyperapi)
What did you expect to happen?
successful deployment
What was the actual behavior?
deployment fails. below is log
Step to reproduce: runtime.txt >
requirements.txt >
pantab
main.py >
cf push command
Please confirm where necessary: