Avaiga / taipy

Turns Data and AI algorithms into production-ready web applications in no time.
https://www.taipy.io
Apache License 2.0
10.94k stars 775 forks source link

Bug installing Taipy 3.0 on Colab #365

Closed vhfgosselin closed 9 months ago

vhfgosselin commented 10 months ago

I am using Colab. Just did: !pip install taipy It failed with the following message:

Attempting uninstall: blinker Found existing installation: blinker 1.4 ERROR: Cannot uninstall 'blinker'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

FYI, Colab currently uses Python 3.10.12

I have added the full trace below: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.8/56.8 kB 5.5 MB/s eta 0:00:00 Requirement already satisfied: setuptools in /usr/local/lib/python3.10/dist-packages (from zope.interface->gevent<24.0,>=23.7.0->taipy-gui<3.1,>=3.0->taipy) (67.7.2) Collecting types-python-dateutil>=2.8.10 (from arrow->jinja2-time>=0.2.0->cookiecutter<2.2,>=2.1.1->taipy) Downloading types_python_dateutil-2.8.19.14-py3-none-any.whl (9.4 kB) Collecting h11<1,>=0.9.0 (from wsproto->simple-websocket<1.0,>=0.10.1->taipy-gui<3.1,>=3.0->taipy) Downloading h11-0.14.0-py3-none-any.whl (58 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.3/58.3 kB 7.7 MB/s eta 0:00:00 Requirement already satisfied: cloudpickle>=1.5.0 in /usr/local/lib/python3.10/dist-packages (from dask>=2.22.0->modin[dask]<1.0,>=0.23.0->taipy-core<3.1,>=3.0->taipy-rest<3.1,>=3.0->taipy) (2.2.1) Requirement already satisfied: partd>=1.2.0 in /usr/local/lib/python3.10/dist-packages (from dask>=2.22.0->modin[dask]<1.0,>=0.23.0->taipy-core<3.1,>=3.0->taipy-rest<3.1,>=3.0->taipy) (1.4.1) Requirement already satisfied: toolz>=0.10.0 in /usr/local/lib/python3.10/dist-packages (from dask>=2.22.0->modin[dask]<1.0,>=0.23.0->taipy-core<3.1,>=3.0->taipy-rest<3.1,>=3.0->taipy) (0.12.0) Requirement already satisfied: importlib-metadata>=4.13.0 in /usr/local/lib/python3.10/dist-packages (from dask>=2.22.0->modin[dask]<1.0,>=0.23.0->taipy-core<3.1,>=3.0->taipy-rest<3.1,>=3.0->taipy) (6.8.0) Requirement already satisfied: locket>=1.0.0 in /usr/local/lib/python3.10/dist-packages (from distributed>=2.22.0->modin[dask]<1.0,>=0.23.0->taipy-core<3.1,>=3.0->taipy-rest<3.1,>=3.0->taipy) (1.0.0) Requirement already satisfied: msgpack>=1.0.0 in /usr/local/lib/python3.10/dist-packages (from distributed>=2.22.0->modin[dask]<1.0,>=0.23.0->taipy-core<3.1,>=3.0->taipy-rest<3.1,>=3.0->taipy) (1.0.7) Requirement already satisfied: sortedcontainers>=2.0.5 in /usr/local/lib/python3.10/dist-packages (from distributed>=2.22.0->modin[dask]<1.0,>=0.23.0->taipy-core<3.1,>=3.0->taipy-rest<3.1,>=3.0->taipy) (2.4.0) Requirement already satisfied: tblib>=1.6.0 in /usr/local/lib/python3.10/dist-packages (from distributed>=2.22.0->modin[dask]<1.0,>=0.23.0->taipy-core<3.1,>=3.0->taipy-rest<3.1,>=3.0->taipy) (3.0.0) Requirement already satisfied: tornado>=6.0.4 in /usr/local/lib/python3.10/dist-packages (from distributed>=2.22.0->modin[dask]<1.0,>=0.23.0->taipy-core<3.1,>=3.0->taipy-rest<3.1,>=3.0->taipy) (6.3.2) Requirement already satisfied: zict>=2.2.0 in /usr/local/lib/python3.10/dist-packages (from distributed>=2.22.0->modin[dask]<1.0,>=0.23.0->taipy-core<3.1,>=3.0->taipy-rest<3.1,>=3.0->taipy) (3.0.0) Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.10/dist-packages (from importlib-metadata>=4.13.0->dask>=2.22.0->modin[dask]<1.0,>=0.23.0->taipy-core<3.1,>=3.0->taipy-rest<3.1,>=3.0->taipy) (3.17.0) Building wheels for collected packages: taipy, taipy-gui, taipy-rest, taipy-templates, gitignore-parser, taipy-core, taipy-config Building wheel for taipy (pyproject.toml) ... done Created wheel for taipy: filename=taipy-3.0.0-py3-none-any.whl size=283832 sha256=e666cb49d6c3989e26f4bd06cbfbee226cddf52dec38afc766dc8dab93e2a26b Stored in directory: /root/.cache/pip/wheels/9a/ba/f5/f8c1242144d2d1bef1c310aee88e41aaac8cb8f4d30ad34e0d Building wheel for taipy-gui (pyproject.toml) ... done Created wheel for taipy-gui: filename=taipy_gui-3.0.0-py3-none-any.whl size=2687431 sha256=3780e1af557b7152dc3ec16e7019e6692d4a5d42a2f1b9f1c092fb8c182e0d47 Stored in directory: /root/.cache/pip/wheels/74/8a/49/55a714960d743cfa920ce2d72f81578d12c954f44a4ac41af4 Building wheel for taipy-rest (setup.py) ... done Created wheel for taipy-rest: filename=taipy_rest-3.0.0-py3-none-any.whl size=42189 sha256=89847ffbd2d79538df3e95fc29fcae829780a5d67aa3adb6e2004cce6cb2361c Stored in directory: /root/.cache/pip/wheels/bd/28/6c/92544e6beb793824982486c86dd8ccc2d7c669f997718484e4 Building wheel for taipy-templates (pyproject.toml) ... done Created wheel for taipy-templates: filename=taipy_templates-3.0.0-py3-none-any.whl size=24901 sha256=9951839a3a0f8224201e694ba7024e59f6998c8e995bebca24538d68c2e61769 Stored in directory: /root/.cache/pip/wheels/ff/bb/c1/cf6c3a0a1ccacd9b357c4255dbee7021d2397a816cef6c6170 Building wheel for gitignore-parser (pyproject.toml) ... done Created wheel for gitignore-parser: filename=gitignore_parser-0.1.9-py3-none-any.whl size=4957 sha256=a328fd3cb8748f2a370e289cbca6113d40b9bfa756ccdb155376bac3b79fa11e Stored in directory: /root/.cache/pip/wheels/74/1a/fa/30ef804eda1ccc7f64be4784b16a5eb0822be8c6345458b87e Building wheel for taipy-core (pyproject.toml) ... done Created wheel for taipy-core: filename=taipy_core-3.0.0-py3-none-any.whl size=250279 sha256=cce7c46790fbe8df499a52bfc85fe572f83092dfb51dcb5d9d534936535ce504 Stored in directory: /root/.cache/pip/wheels/9d/af/a7/a825e2d719a3bc3b22c9a943fe96f5e70b8d3a97e59b02f180 Building wheel for taipy-config (setup.py) ... done Created wheel for taipy-config: filename=taipy_config-3.0.0-py3-none-any.whl size=50070 sha256=bd384f44d827fb1ac3cdda270ab0b2f659a2971fc68fe079d777daf55f1d066d Stored in directory: /root/.cache/pip/wheels/a8/07/bb/58917d552d172d4e59f78f03425273c4c567c4e9dc9c30775e Successfully built taipy taipy-gui taipy-rest taipy-templates gitignore-parser taipy-core taipy-config Installing collected packages: types-python-dateutil, pytz, passlib, kthread, incremental, gitignore-parser, constantly, aniso8601, zope.interface, zope.event, tzdata, taipy-templates, python-dotenv, pyarrow, orjson, ordered-set, networkx, marshmallow, Mako, hyperlink, h11, dnspython, blinker, binaryornot, automat, apispec, wsproto, twisted, pytz-deprecation-shim, pymongo, pandas, marshmallow-sqlalchemy, gevent, flask, deepdiff, arrow, alembic, tzlocal, taipy-config, simple-websocket, modin, jinja2-time, gevent-websocket, Flask-SQLAlchemy, flask-restful, flask-marshmallow, flask-cors, apispec-webframeworks, python-engineio, flask-migrate, cookiecutter, taipy-core, python-socketio, taipy-rest, flask-socketio, taipy-gui, taipy Attempting uninstall: pytz Found existing installation: pytz 2023.3.post1 Uninstalling pytz-2023.3.post1: Successfully uninstalled pytz-2023.3.post1 Attempting uninstall: pyarrow Found existing installation: pyarrow 9.0.0 Uninstalling pyarrow-9.0.0: Successfully uninstalled pyarrow-9.0.0 Attempting uninstall: networkx Found existing installation: networkx 3.2 Uninstalling networkx-3.2: Successfully uninstalled networkx-3.2 Attempting uninstall: blinker Found existing installation: blinker 1.4 ERROR: Cannot uninstall 'blinker'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

AlexandreSajus commented 10 months ago

This is linked with the 3.0 release. I just tried the same thing with 2.4.0 and it works

FabienLelaquais commented 10 months ago

https://github.com/embedchain/embedchain/issues/506 seems to provide a workaround to that thing. @AlexandreSajus, @vhfgosselin can anyone show me what 'using Colab' means? Thx

vhfgosselin commented 10 months ago

Fabien,

Colab is the most used platform (mostly because it is free) by Python dev. This is Google’s platform. Just go to https://colab.research.google.com/?utm_source=scs-index

Select new notebook and you are ready to go!

Vincent

On Sat 28 Oct 2023 at 10:54, Fabien Lelaquais @.***> wrote:

embedchain/embedchain#506 https://github.com/embedchain/embedchain/issues/506 seems to provide a workaround to that thing. @AlexandreSajus https://github.com/AlexandreSajus, @vhfgosselin https://github.com/vhfgosselin can anyone show me what 'using Colab' means? Thx

— Reply to this email directly, view it on GitHub https://github.com/Avaiga/taipy/issues/365#issuecomment-1783752022, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE6OHSX2BKYSHRANEOLWF33YBTB5BAVCNFSM6AAAAAA6S72TXCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBTG42TEMBSGI . You are receiving this because you were mentioned.Message ID: @.***>

FabienLelaquais commented 10 months ago

Oh that was easy... I thought I would have to have some registration or whatever. Thanks

FabienLelaquais commented 10 months ago

Problem identification

The default packages that get installed by default in my Colab environment (Python 3.10) include the blinker 1.4 package that is related to event management. taipy-gui 3.0 (latest version as of today) depends on flask>=3.0 that depends on blinker>=1.6.2.

When installing Taipy GUI, Colab refuses to upgrade blinker because it uses an alternate setup technology. This is not related to Taipy really, and until Colab upgrades the default Python environment packages, we have to work this out.

Workaround

In order to install Taipy, we need to force the installation of a blinker compatible with Taipy's requirements for Flask. You do that by issuing: !pip install --ignore-installed taipy.

This command will install the latest public Taipy. Note that the version of the blinker package was properly upgraded to 1.6.3, compatible with Taipy 3.0, the latest version available at the time of this writing.

Actions

FabienLelaquais commented 10 months ago

Please @vhfgosselin acknowledge that my comment does address this issue and close it if you agree.

FabienLelaquais commented 10 months ago

Please @vhfgosselin acknowledge that my comment does address this issue and close it if you agree.

FabienLelaquais commented 9 months ago

Please @vhfgosselin acknowledge that my comment does address this issue and close it if you agree.

vhfgosselin commented 9 months ago

When I install taipy on colab using !pip install --ignore-installed taipy, at the very I get the end the following messages:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. ipython 7.34.0 requires jedi>=0.16, which is not installed. lida 0.0.10 requires fastapi, which is not installed. lida 0.0.10 requires kaleido, which is not installed. lida 0.0.10 requires python-multipart, which is not installed. lida 0.0.10 requires uvicorn, which is not installed. llmx 0.0.15a0 requires cohere, which is not installed. llmx 0.0.15a0 requires openai, which is not installed. llmx 0.0.15a0 requires tiktoken, which is not installed. cupy-cuda11x 11.0.0 requires numpy<1.26,>=1.20, but you have numpy 1.26.2 which is incompatible. gcsfs 2023.6.0 requires fsspec==2023.6.0, but you have fsspec 2023.10.0 which is incompatible. google-colab 1.0.0 requires pandas==1.5.3, but you have pandas 2.1.3 which is incompatible. google-colab 1.0.0 requires tornado==6.3.2, but you have tornado 6.3.3 which is incompatible. ibis-framework 6.2.0 requires pytz>=2022.7, but you have pytz 2022.1 which is incompatible. pandas-gbq 0.17.9 requires pyarrow<10.0dev,>=3.0.0, but you have pyarrow 10.0.1 which is incompatible. tensorflow-probability 0.22.0 requires typing-extensions<4.6.0, but you have typing-extensions 4.8.0 which is incompatible. yfinance 0.2.31 requires pytz>=2022.5, but you have pytz 2022.1 which is incompatible.

So I end up with taipy 3.0 installed but with pandas 1.5.3 (not pandas 2.x)...