Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Colab support only Python 3.10 #102

Open
Rolkarolka opened this issue Aug 2, 2023 · 7 comments
Open

Google Colab support only Python 3.10 #102

Rolkarolka opened this issue Aug 2, 2023 · 7 comments

Comments

@Rolkarolka
Copy link

Hi! Is there any chance to enable ecco for python 3.10? I've tried running jupyter notebooks from docs (like https://colab.research.google.com/github/jalammar/ecco/blob/main/notebooks/Language_Models_and_Ecco_PyData_Khobar.ipynb) in Google Colab and I can't install ecco successfully :(

Collecting ecco
  Downloading ecco-0.1.2-py2.py3-none-any.whl (70 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 70.7/70.7 kB 1.2 MB/s eta 0:00:00
Collecting transformers~=4.2 (from ecco)
  Downloading transformers-4.31.0-py3-none-any.whl (7.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.4/7.4 MB 17.3 MB/s eta 0:00:00
Requirement already satisfied: seaborn~=0.11 in /usr/local/lib/python3.10/dist-packages (from ecco) (0.12.2)
Collecting scikit-learn~=0.23 (from ecco)
  Downloading scikit-learn-0.24.2.tar.gz (7.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.5/7.5 MB 32.8 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  Preparing metadata (pyproject.toml) ... error
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.
@EricPeter
Copy link

EricPeter commented Aug 11, 2023

Hi did you manage to install it . I am having the seem issue

@martin12333
Copy link

martin12333 commented Aug 12, 2023

Weeks ago, I made the ecco *.ipynb mostly work. In Python 3.10 .

Locally. In a conda env with many other programs.

I remember having problems with version numbers of dependencies. I had to edit the req file(s) of ecco: as a false-beginner, I edited both setup.py, and requirements.txt

My notes are at
https://github.com/martin12333/marti-onedrive/blob/main2/AI/pip----31pip310ecco.e.f8.sh

My files setup.py, and requirements.txt are at
https://github.com/martin12333/marti-onedrive/tree/main2/AI/Jalammar

EDIT: the versions I have:
numpy 1.24.3
scikit-learn 1.2.2
transformers 4.29.2
torch 1.13.1
PyYAML 6.0

@akozlo
Copy link

akozlo commented Aug 14, 2023

I'm having a similar issue. Simply running !pip install ecco on a google colab notebook produces an error now.

Untitled

@iliemihai
Copy link

Downgrade to python 3.8:
!apt-get install python3.8 !ln -sf /usr/bin/python3.8 /usr/bin/python !sudo apt-get install python3.8-distutils !wget https://bootstrap.pypa.io/get-pip.py !sudo /usr/bin/python3.8 get-pip.py

@daria-lioubashevski
Copy link

Did anyone manage to resolve this issue?
I tried downgrading to python 3.8 as suggested here, and it didn't work - pip install ecco comand seems to finish successfully, but when running:
import ecco
I get the error: ModuleNotFoundError: No module named 'ecco'

@hxyin
Copy link

hxyin commented Nov 28, 2023

I solved this problem by making a fork of the ecco library and change the contents in setup.py and requirements.txt based on the version provided by martin12333 #102 (comment). And then I installed my repo in colab using !sudo pip install git+https://github.com/hxyin/ecco. I hope this works for you, too!

@daria-lioubashevski
Copy link

@hxyin thank you so much!
i managed to install ecco using your answer by doing the following:

import os
from getpass import getpass
user = getpass('GitHub user')
password = getpass('GitHub password')
os.environ['GITHUB_AUTH'] = user + ':' + password
!git clone https://$[email protected]/hxyin/ecco

%cd ecco
!pip install -e .

Now a new problem - ecco.from_pretrained which appears in all examples doesn't work, and I can't find a way to import LM class directly for some reason

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants