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

求助大佬,找不到script目录下的模块 #93

Open
huang-cmd opened this issue Sep 23, 2024 · 3 comments
Open

求助大佬,找不到script目录下的模块 #93

huang-cmd opened this issue Sep 23, 2024 · 3 comments

Comments

@huang-cmd
Copy link

报错Module NotFoundError:No module

@skywind3000
Copy link
Owner

sys.path.append('./script')

了没有?

@huang-cmd
Copy link
Author

加了os.chdir(os.path.dirname(file))
sys.path.append(os.path.abspath('script'))
检查了一下打印是有的

@huang-cmd
Copy link
Author

不好意思,搞错问题了,是读不到sitpackage里的模块。可以读到script文件夹里的main.py文件
,这个main.py文件import了sitpackage文件夹里模块,就会报错

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

2 participants