Free-Wilson icon indicating copy to clipboard operation
Free-Wilson copied to clipboard

can't import joblib from sklearn.externals

Open slchan3 opened this issue 3 years ago • 3 comments

Hello Pat,

Many thanks for sharing your work on Free Wilson analysis!

I am trying it out.

  1. I cloned your repository onto my computer.
  2. I created a new rdkit environment by "conda create -c conda-forge -n freewilson rdkit"
  3. I installed the dependencies as suggested, using "pip install docopt tqdm pyfancy sklearn scipy". Upon finishing, it says "Successfully installed docopt-0.6.2 joblib-1.1.0 pyfancy-2.4.5 scikit-learn-1.1.2 scipy-1.9.1 sklearn-0.0 threadpoolctl-3.1.0 tqdm-4.64.0" so I suppose it went well.
  4. I tried to run the demo as suggested. I went into Free-Wilson/data/ and do "../free_wilson.py all --scaffold scaffold.mol --in fw_mols.smi --act fw_act.csv --prefix test"

Unfortunately it says "ImportError: cannot import name 'joblib' from 'sklearn.externals' (..../miniconda3/envs/freewilson/lib/python3.10/site-packages/sklearn/externals/init.py) " Just wonder what am I missing?

Thank you again!

Ling Chan

slchan3 avatar Aug 30 '22 02:08 slchan3

After some searches, it turns out that I only need to change the lines from sklearn.externals import joblib to import joblib for the crash goes away. I assume that things are working.

slchan3 avatar Sep 05 '22 01:09 slchan3

Thanks for letting me know. I updated the code. Btw, there's a better Free-Wilson implementation in my Practical Cheminformatics Tutorials repo.

PatWalters avatar Sep 05 '22 15:09 PatWalters

Oh, actually thank you for sharing the package! Ling

On Mon, Sep 5, 2022 at 8:30 AM Patrick Walters @.***> wrote:

Thanks for letting me know. I updated the code. Btw, there's a better Free-Wilson implementation in my Practical Cheminformatics Tutorials https://github.com/PatWalters/practical_cheminformatics_tutorials repo.

— Reply to this email directly, view it on GitHub https://github.com/PatWalters/Free-Wilson/issues/8#issuecomment-1237211897, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARHCUCBYDZHJXDCNRV5U5M3V4YGZ5ANCNFSM5772QLGA . You are receiving this because you authored the thread.Message ID: @.***>

slchan3 avatar Oct 11 '22 07:10 slchan3