StudyOnly
StudyOnly

Reputation: 39

error when pip install google-colab --use-pep517

i got this error:

Collecting pandas~=0.24.0 (from google-colab) Using cached pandas-0.24.2.tar.gz (11.8 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [4 lines of output] :12: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html error in pandas setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Expected end or semicolon (after version specifier) pytz >= 2011k ~~~~~~~^ [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

Upvotes: 1

Views: 2333

Answers (1)

Roland Pihlakas
Roland Pihlakas

Reputation: 4573

Seems like PyPI hosts some old version. See also https://github.com/googlecolab/colabtools/issues/2598

I used the following command to install directly from source:

  pip install -e git+https://github.com/googlecolab/colabtools#egg=google.colab

Be warned that google.colab requires quite old package versions on its dependencies even when installed from source. So using virtualenv is recommended here.

Upvotes: 2

Related Questions