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

No module named src #19

Open
hannlp opened this issue May 3, 2019 · 5 comments
Open

No module named src #19

hannlp opened this issue May 3, 2019 · 5 comments

Comments

@hannlp
Copy link

hannlp commented May 3, 2019

为什么我运行时会报这个错误呢?
Traceback (most recent call last):
File "graph_gan.py", line 11, in
from src import utils
ModuleNotFoundError: No module named 'src'

@SRL94
Copy link

SRL94 commented May 28, 2019

@1140325971 I solve this issue by running it in Pycharm.

@shuo-git
Copy link

shuo-git commented Jun 9, 2019

export PYTHONPATH=<The path of GraphGAN>:$PYTHONPATH
Adding your code dir to PYTHONPATH may help

@Diamond0728
Copy link

@1140325971 I solve this issue by running it in Pycharm.

It works , thanks

@SherylHYX
Copy link

You can add these two lines at the beginning of graph_gan.py(可以考虑在graph_gan.py前面加上两行):
import sys
sys.append.path("../../")

为什么我运行时会报这个错误呢?
Traceback (most recent call last):
File "graph_gan.py", line 11, in
from src import utils
ModuleNotFoundError: No module named 'src'

@liuhuofighting
Copy link

I use ubuntu20.04
import sys
sys.path.append("src所在的目录") #可以在src目录下使用pwd查看
import utils
from evaluation import link_prediction as lp
import discriminator #源代码缺少这个的引用

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

6 participants