AI-sandbox/gnomix

Issue with the requirement.txt

Closed this issue · 6 comments

Hi,

I am trying to install the dependencies and I am having a hard time with it.

$ pip install -r requirements.txt 
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Requirement already satisfied: cycler==0.10.0 in /usr/local/lib/python3.9/site-packages (from -r requirements.txt (line 1)) (0.10.0)
Collecting Cython==0.29.21
  Using cached Cython-0.29.21-py2.py3-none-any.whl (974 kB)
Collecting dask==2.20.0
  Using cached dask-2.20.0-py3-none-any.whl (826 kB)
ERROR: Could not find a version that satisfies the requirement dataclasses==0.8 (from versions: 0.1, 0.2, 0.3, 0.4, 0.5, 0.6)
ERROR: No matching distribution found for dataclasses==0.8

I can't find a way to install this dataclasses version 0.8...

Also when I try to run gnomix.py I get this error:


$ python3 gnomix.py 
Traceback (most recent call last):
  File "gnomix.py", line 16, in <module>
    from src.model import Gnomix
  File "/Users/debortoli/Dropbox/Postdoc/brazil/hgdp/gnomix-main/src/model.py", line 8, in <module>
    from src.Smooth.models import XGB_Smoother, CRF_Smoother
  File "/Users/debortoli/Dropbox/Postdoc/brazil/hgdp/gnomix-main/src/Smooth/models.py", line 6, in <module>
    from src.Smooth.crf import CRF
  File "/Users/debortoli/Dropbox/Postdoc/brazil/hgdp/gnomix-main/src/Smooth/crf.py", line 3, in <module>
    import sklearn_crfsuite
ModuleNotFoundError: No module named 'sklearn_crfsuite'

Not sure if it's related to my python or because I am using a Mac...

Any help is helpful,

Thank you.

Hi guidebortoli,

Thanks for letting us know. Both of those issues are related to the installation of the dependencies.
I've updated the requirements file to have flexible versions of the dependencies which will make it easier to install them across devices.

Please try to pull the latest version and install the requirements again.
Let me know if you run into further issues.

-Helgi

Hi @weekend37
When I tried again the pip command, it worked!

But the second error still persists, i.e. the ModuleNotFoundError: No module named 'sklearn_crfsuite'

Interesting. But the requirements file was installed successfully?

Try to run in the command line:
pip install sklearn-crfsuite
and make sure that it's installed.

Then try to run gnomix once again

So, I've tried the pip install sklearn-crfsuite and I've gotten this message below.
After that I ran the Gnomix again and got the same message as above (the problem with the ModuleNotFoundError: No module named 'sklearn_crfsuite')


$ pip install sklearn-crfsuite
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Requirement already satisfied: sklearn-crfsuite in /usr/local/lib/python3.9/site-packages (0.3.6)
Requirement already satisfied: six in /usr/local/lib/python3.9/site-packages (from sklearn-crfsuite) (1.16.0)
Requirement already satisfied: tabulate in /usr/local/lib/python3.9/site-packages (from sklearn-crfsuite) (0.8.9)
Requirement already satisfied: tqdm>=2.0 in /usr/local/lib/python3.9/site-packages (from sklearn-crfsuite) (4.62.3)
Requirement already satisfied: python-crfsuite>=0.8.3 in /usr/local/lib/python3.9/site-packages (from sklearn-crfsuite) (0.9.7)
(base)

ok. I'm guessing that you're using a python from a path different to what you're installing to (maybe check this out).

In that case you seem to have most other packages installed correctly, so what I've done is that I've pushed an update with a soft dependency on the crf_suite.
So as long as you're not using the fast version of gnomix, you don't need to have crf_suite installed.

Please try the latest version

git pull
python3 gnomix.py ...

and let me know if it doesn't work for you.

-Helgi

I assume this worked, marking as closed