Pycharm报错subprocess.CalledProcessError: Command ‘[‘where‘, ‘cl‘]‘ returned non-zero exit status 1.

Pycharm报错subprocess.CalledProcessError: Command '['where', 'cl']' returned non-zero exit status 1.

写在前面

在Windows的Pycharm上运行StyleGAN2报错:
subprocess.CalledProcessError: Command ‘[‘where’, ‘cl’]’ returned non-zero exit status 1.
在这里插入图片描述

解决方法

(1)下载VS2019,不要下VS2022,这里我安装在D盘
(2)添加环境变量
D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64
(3)重启电脑

写在后面

终于搞定了,我哭了。。。。。

猜你喜欢

转载自blog.csdn.net/iiiiiiimp/article/details/126941469