Quantcast
Channel: Active questions tagged kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 6334

Python could not load module in the same directory

$
0
0

I'm trying to import a module (test) in the Jupiter notebook. The working directory is "gnn". The "test" folder containing .py files is right under the working directory "gnn". I could successfully load it when using python3 kernel. However, when I switched to "python2.7" kernel, it shows the error "no module named test". I have searched and found one potential solution as follows.

sys.path.append('/home/jovyan/work/Dropbox/gnn')

Although the current working directory was added to sys.path, I still could not load the test module. I have tried to run in the shell, the same problem exists. So I don't think it is a problem of Jupyter notebook. Any suggestions? Thank you so much.


Viewing all articles
Browse latest Browse all 6334

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>