我是第一次尝试 pyqtdeploy,following the docs .
运行 build-demo.py 时出现以下错误:
C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\Lib\site-packag
es\pyqtdeploy\demo>python build-demo.py
pyqtdeploy-sysroot: Unable to detect MSVC2015 or MSVC2017.
py 文件似乎从
os
获取环境变量。模块,就像在 python console
中运行相同的命令一样它工作正常。不知怎的pyqtdeploy
有这个问题。我在系统中安装了构建工具;我在这里想念什么?
最佳答案
您必须搜索 的位置vcvars64.bat 在您的构建工具的文件夹位置并复制它。这取决于您的系统环境和安装的 Visual Studio 版本。
在运行 pyqtdeploy 脚本之前,将该位置粘贴到命令提示符中。这将初始化环境并启用对 的检测。 MSVC x64。
Step 1 : Download all the required packages ....
pic1
Step 2 : Browse to the directory where Micosoft Visual Studio is installed
pic2
Step 3: Search for vcvars64.bat in that directory
pic3
Step 4 : Run vcvars64.bat and if it successful, run pyqtdeploy-sysroot sysroot.json
pic4
关于pyqtdeploy:无法检测到 MSVC2015 或 MSVC2017,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55409969/