gnn4dr / DRKG

A knowledge graph and a set of tools for drug repurposing
Apache License 2.0
565 stars 153 forks source link

ModuleNotFoundError: No module named 'utils' #19

Open jdauvill opened 3 years ago

jdauvill commented 3 years ago

Hi - When I try running this notebook, the 'utils' module is not found. (I have the CWD set to the directory where I downloaded the DRKG) Where should this 'utils' module be ?


ModuleNotFoundError Traceback (most recent call last)

in 4 import sys 5 sys.path.insert(1, '../utils') ----> 6 from utils import download_and_extract 7 download_and_extract() 8 drkg_file = '../data/drkg/drkg.tsv' ModuleNotFoundError: No module named 'utils'
mufeili commented 3 years ago

By "the directory where I downloaded the DRKG", do you mean the DRKG repo is in the CWD or the CWD is DRKG/?

jdauvill commented 3 years ago

the CWD is DRKG/ -------- Message d'origine --------De : Mufei Li notifications@github.com Date : 21.10.20 20:25 (GMT+01:00) À : gnn4dr/DRKG DRKG@noreply.github.com Cc : jdauvill jerome.dauvillier@sib.swiss, Author author@noreply.github.com Objet : {Disarmed} Re: [gnn4dr/DRKG] ModuleNotFoundError: No module named 'utils' (#19) By "the directory where I downloaded the DRKG", do you mean the DRKG repo is in the CWD or the CWD is DRKG/?

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.

mufeili commented 3 years ago

I think you can simply do

In [1]: pwd
Out[1]: '/Users/mufei/DRKG'

In [2]: from utils.utils import download_and_extract