snake-ai
snake-ai copied to clipboard
运行test_cnn.py报错
D:\Downloads\Astudy\setpath\python.exe "D:\Watershed APP\pycharm2021\SetPath\PyCharm 2021.3\plugins\python\helpers\pycharm_jb_pytest_runner.py" --path D:/python-code/snake-newai/snake-ai/main/test_cnn.py Testing started at 2:11 ... Launching pytest with arguments D:/python-code/snake-newai/snake-ai/main/test_cnn.py --no-header --no-summary -q in D:\python-code\snake-newai\snake-ai\main
============================= test session starts ============================= collecting ... Using seed = 404264808 for testing.
test_cnn.py:None (test_cnn.py)
test_cnn.py:25: in
!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! ======================== 2 warnings, 1 error in 3.36s =========================
进程已结束,退出代码2
使用软件:pycharm 在装环境时没有执行:
[可选] 使用 GPU 训练需要手动安装完整版 PyTorch
conda install pytorch=2.0.0 torchvision pytorch-cuda=11.8 -c pytorch -c nvidia
[可选] 运行程序脚本测试 PyTorch 是否能成功调用 GPU
python .\utils\check_gpu_status.py
即便换成这个也会报错
问题已解决,环境问题,库没装完全