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

demo运行失败 #8

Closed
Ephemeralwanning opened this issue Jan 30, 2023 · 10 comments
Closed

demo运行失败 #8

Ephemeralwanning opened this issue Jan 30, 2023 · 10 comments

Comments

@Ephemeralwanning
Copy link

win11 python3.8.5 32位

为什么我安装后全部demo都无法运行呢,基本都是下图错误

QQ截图20230130205810

@zhiyiYo
Copy link
Owner

zhiyiYo commented Jan 30, 2023

这个还是scipy的导入问题,安装的是full版本吗?不然 lite 版本应该不会用到scipy的

@zhiyiYo
Copy link
Owner

zhiyiYo commented Jan 30, 2023

建议搭个虚拟环境测试一下,应该不会有问题的

@Ephemeralwanning
Copy link
Author

这个还是scipy的导入问题,安装的是full版本吗?不然 lite 版本应该不会用到scipy的

这样吗 我以为我scipy安装成功后就能直接用full版本了呢

我刚刚重新用了lite版部分demo就能运行成功了

但是好像所有带resource文件夹的demo都无法运行

@zhiyiYo
Copy link
Owner

zhiyiYo commented Jan 30, 2023

可能是你的运行路径有问题,你有切换到 demo.py 所在目录运行吗?

@Ephemeralwanning
Copy link
Author

Ephemeralwanning commented Jan 30, 2023

可能是你的运行路径有问题,你有切换到 demo.py 所在目录运行吗?

我是vscode打开目录 点击 demo 直接运行

@zhiyiYo
Copy link
Owner

zhiyiYo commented Jan 30, 2023

如果你是用的 python 插件提供的运行按钮,他不会切换到 demo.py 所在目录的,建议安装一个 code runner 插件,然后按住 ctrl+alt+n 运行 demo.py

@Ephemeralwanning
Copy link
Author

Ephemeralwanning commented Jan 30, 2023

如果你是用的 python 插件提供的运行按钮,他不会切换到 demo.py 所在目录的,建议安装一个 code runner 插件,然后按住 ctrl+alt+n 运行 demo.py

试了一下 好像resource里带qss的都无法运行

QQ截图20230130215141

@zhiyiYo
Copy link
Owner

zhiyiYo commented Jan 30, 2023

请在 .vscode/settings.json 中填入下述配置:

{
    "code-runner.executorMap": {
        "python": "cd $dir && python $fileName",
    }
}

image
我图片里面用的是虚拟环境 PyQt-Fluent-Widgets 的 python.exe 路径,你可以换成你自己的 python.exe 路径

@Ephemeralwanning
Copy link
Author

请在 .vscode/settings.json 中填入下述配置:

{
    "code-runner.executorMap": {
        "python": "cd $dir && python $fileName",
    }
}

image 我图片里面用的是虚拟环境 PyQt-Fluent-Widgets 的 python.exe 路径,你可以换成你自己的 python.exe 路径

哇 可以运行了非常感谢您的解答

@zhiyiYo
Copy link
Owner

zhiyiYo commented Jan 30, 2023

有其他问题欢迎提新 issue 🙂

@zhiyiYo zhiyiYo closed this as completed Jan 30, 2023
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