bfast icon indicating copy to clipboard operation
bfast copied to clipboard

Version 0.7 fails to install on google colab

Open mirt001 opened this issue 4 years ago • 2 comments

While installing, it gives this warning in this colab notebook: WARNING: Discarding https://files.pythonhosted.org/packages/d6/14/9418fc5dacae355be2ea1ec3d410d5d7b9c4d3d47c8eac1ef10dea20fd7f/bfast-0.7.tar.gz#sha256=649b8a6882db13634819b46ac056275683353591da77497d712236c595db2b79 (from https://pypi.org/simple/bfast/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

So I checked the log, and it says that pyopencl is not found.

2021-08-30T16:09:55,905 Found link https://files.pythonhosted.org/packages/26/f1/b319368e760c8ba1017aadbd6de59cebf0b8cc2e93a1acad41db39e82a84/bfast-0.6.tar.gz#sha256=0126479167a744c5deec9288c1eaafc7ecb11471d4a32e8725ef2b285a1bf178 (from https://pypi.org/simple/bfast/), version: 0.6 2021-08-30T16:09:55,906 Found link https://files.pythonhosted.org/packages/d6/14/9418fc5dacae355be2ea1ec3d410d5d7b9c4d3d47c8eac1ef10dea20fd7f/bfast-0.7.tar.gz#sha256=649b8a6882db13634819b46ac056275683353591da77497d712236c595db2b79 (from https://pypi.org/simple/bfast/), version: 0.7 2021-08-30T16:09:55,906 Skipping link: not a file: https://pypi.org/simple/bfast/ 2021-08-30T16:09:55,906 Given no hashes to check 27 links for project 'bfast': discarding no candidates 2021-08-30T16:09:55,915 Collecting bfast 2021-08-30T16:09:55,915 Created temporary directory: /tmp/pip-unpack-92hap_30 2021-08-30T16:09:55,941 Downloading bfast-0.7.tar.gz (306 kB) 2021-08-30T16:09:56,000 Added bfast from https://files.pythonhosted.org/packages/d6/14/9418fc5dacae355be2ea1ec3d410d5d7b9c4d3d47c8eac1ef10dea20fd7f/bfast-0.7.tar.gz#sha256=649b8a6882db13634819b46ac056275683353591da77497d712236c595db2b79 to build tracker '/tmp/pip-req-tracker-6oz_n0kw' 2021-08-30T16:09:56,001 Running setup.py (path:/tmp/pip-install-xs33_vzd/bfast_d9f2a4c123a648ea8b440a89844c2869/setup.py) egg_info for package bfast 2021-08-30T16:09:56,001 Created temporary directory: /tmp/pip-pip-egg-info-km7t62k_ 2021-08-30T16:09:56,001 Running command python setup.py egg_info 2021-08-30T16:09:56,645 Traceback (most recent call last): 2021-08-30T16:09:56,645 File "", line 1, in 2021-08-30T16:09:56,645 File "/tmp/pip-install-xs33_vzd/bfast_d9f2a4c123a648ea8b440a89844c2869/setup.py", line 16, in 2021-08-30T16:09:56,645 import bfast 2021-08-30T16:09:56,645 File "/tmp/pip-install-xs33_vzd/bfast_d9f2a4c123a648ea8b440a89844c2869/bfast/init.py", line 1, in 2021-08-30T16:09:56,645 from .models import BFASTMonitor 2021-08-30T16:09:56,645 File "/tmp/pip-install-xs33_vzd/bfast_d9f2a4c123a648ea8b440a89844c2869/bfast/models.py", line 1, in 2021-08-30T16:09:56,646 from bfast.monitor import BFASTMonitorPython 2021-08-30T16:09:56,646 File "/tmp/pip-install-xs33_vzd/bfast_d9f2a4c123a648ea8b440a89844c2869/bfast/monitor/init.py", line 1, in 2021-08-30T16:09:56,646 from .opencl import BFASTMonitorOpenCL 2021-08-30T16:09:56,646 File "/tmp/pip-install-xs33_vzd/bfast_d9f2a4c123a648ea8b440a89844c2869/bfast/monitor/opencl/init.py", line 1, in 2021-08-30T16:09:56,646 from .base import BFASTMonitorOpenCL 2021-08-30T16:09:56,646 File "/tmp/pip-install-xs33_vzd/bfast_d9f2a4c123a648ea8b440a89844c2869/bfast/monitor/opencl/base.py", line 13, in 2021-08-30T16:09:56,646 import pyopencl 2021-08-30T16:09:56,646 ModuleNotFoundError: No module named 'pyopencl' 2021-08-30T16:09:56,705 WARNING: Discarding https://files.pythonhosted.org/packages/d6/14/9418fc5dacae355be2ea1ec3d410d5d7b9c4d3d47c8eac1ef10dea20fd7f/bfast-0.7.tar.gz#sha256=649b8a6882db13634819b46ac056275683353591da77497d712236c595db2b79 (from https://pypi.org/simple/bfast/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. 2021-08-30T16:09:56,728 Created temporary directory: /tmp/pip-unpack-awqjgxhj 2021-08-30T16:09:56,800 Downloading bfast-0.6-py3-none-any.whl (811 kB) 2021-08-30T16:09:56,830 Added bfast from https://files.pythonhosted.org/packages/1b/93/81f97ddcb4a7dbfb08158ff5cf8abbc6b2cab07094b883cb0871513cd463/bfast-0.6-py3-none-any.whl#sha256=420c3c278cacdc7ec74ff1c593b29eeca8ed23e785cf78ea004b624c5c869e2f to build tracker '/tmp/pip-req-tracker-6oz_n0kw' 2021-08-30T16:09:56,830 Removed bfast from https://files.pythonhosted.org/packages/1b/93/81f97ddcb4a7dbfb08158ff5cf8abbc6b2cab07094b883cb0871513cd463/bfast-0.6-py3-none-any.whl#sha256=420c3c278cacdc7ec74ff1c593b29eeca8ed23e785cf78ea004b624c5c869e2f from build tracker '/tmp/pip-req-tracker-6oz_n0kw'

But running import pyopencl in colab gives no error. Moreover, version 0.6 still gets installed, and runs correctly using the opencl backend.

mirt001 avatar Aug 30 '21 16:08 mirt001

Just a bit more research revealed that pyopencl is not pre-installed on colab instances. What happens above is that pip tries to install the latest bfast version 0.7, which depends on the not-available pyopencl, so it fails. Afterwards pip automatically tries to install 0.6, which also depends on pyopencl, so it proceeds to install it, and then finishes the installation of bfast 0.6 successfully.

Now both bfast 0.6 and pyopencl are available. The workaround is to manually install pyopencl before attempting to install bfast.

I had a short look at the code, and I'm just more confused of why this issue started to pop-up in version 0.7, as nothing seems to have changed when it comes to pyopencl between versions 0.6 and 0.7.

mirt001 avatar Aug 30 '21 17:08 mirt001

Hmm, interesting. I have to look into this. Could be related to #37

mortvest avatar Aug 31 '21 12:08 mortvest