目录
- 前言
- 1. 总体环境
- 2. 在window跑通的版本
- 3. 成功截图
前言
一开始在window下运行出错,环境一直卡bug,想转linux系统运行
但是bug在眼前,怎么能不解决,最终还是突破了bug,成功在window下执行
1. 总体环境
-
window操作系统
-
cuda驱动:
-
nvcc --version:
-
开发环境:pycharm+python3.7(装在了conda的虚拟环境下)
2. 在window跑通的版本
卡bug调试最难的点是找pytorch与torchvision想配对的版本,且要与项目配对上:
最后执行我项目代码环境来生成
pip freeze > requirements.txt - 如果生成的为路径而不是版本号,再次执行:
pip list --format=freeze > requirements.txt
最后执行成功的requirements.txt:
anyio==3.5.0 argon2-cffi==20.1.0 atomicwrites==1.4.0 attrs==22.1.0 Babel==2.11.0 backcall==0.2.0 beautifulsoup4==4.11.1 bleach==4.1.0 brotlipy==0.7.0 certifi==2022.12.7 cffi==1.15.1 charset-normalizer==2.0.4 colorama==0.4.6 coverage==6.3.2 cryptography==39.0.1 debugpy==1.5.1 decorator==5.1.1 defusedxml==0.7.1 entrypoints==0.4 fastjsonschema==2.16.2 flit_core==3.6.0 idna==3.4 imageio==2.4.1 importlib-metadata==4.11.3 importlib-resources==5.2.0 iniconfig==1.1.1 ipykernel==6.15.2 ipython==7.31.1 ipython-genutils==0.2.0 ipywidgets==7.6.5 jedi==0.18.1 Jinja2==3.1.2 json5==0.9.6 jsonschema==4.17.3 jupyter==1.0.0 jupyter_client==7.4.9 jupyter-console==6.4.4 jupyter_core==4.11.2 jupyter-server==1.23.4 jupyterlab==3.5.3 jupyterlab-pygments==0.1.2 jupyterlab_server==2.19.0 jupyterlab-widgets==1.0.0 MarkupSafe==2.1.1 matplotlib-inline==0.1.6 mistune==0.8.4 mkl-fft==1.3.0 mkl-random==1.1.1 mkl-service==2.3.0 nbclassic==0.5.2 nbclient==0.5.13 nbconvert==6.4.4 nbformat==5.7.0 nest-asyncio==1.5.6 notebook==6.5.2 notebook_shim==0.2.2 numpy==1.19.2 olefile==0.46 packaging==22.0 pandocfilters==1.5.0 parso==0.8.3 pickleshare==0.7.5 Pillow==7.2.0 pip==22.3.1 pkgutil_resolve_name==1.3.10 pluggy==1.0.0 ply==3.11 prometheus-client==0.14.1 prompt-toolkit==3.0.36 psutil==5.9.0 py==1.11.0 pycparser==2.21 Pygments==2.11.2 pyOpenSSL==23.0.0 PyQt5==5.15.7 PyQt5-sip==12.11.0 pyrsistent==0.18.0 PySocks==1.7.1 pytest==7.1.2 pytest-cov==3.0.0 pytest-runner==6.0.0 python-dateutil==2.8.2 pytz==2022.7 pywin32==305.1 pywinpty==2.0.10 pyzmq==23.2.0 qtconsole==5.4.0 QtPy==2.2.0 reedsolo==1.7.0 requests==2.28.1 scipy==1.1.0 Send2Trash==1.8.0 setuptools==65.6.3 sip==6.6.2 six==1.16.0 sniffio==1.2.0 soupsieve==2.3.2.post1 steganogan==0.1.2 terminado==0.17.1 testpath==0.6.0 toml==0.10.2 tomli==2.0.1 torch==1.0.0 torchvision==0.2.2 tornado==6.2 tqdm==4.19.9 traitlets==5.7.1 typing_extensions==4.4.0 urllib3==1.26.14 wcwidth==0.2.5 webencodings==0.5.1 websocket-client==0.58.0 wheel==0.38.4 widgetsnbextension==3.5.2 win-inet-pton==1.1.0 wincertstore==0.2 zipp==3.11.0
如果跟我同配置,还不行,让系统重启更新配置下。
多数都是版本依赖问题
3. 成功截图
如果遇到其他bug,可以在我的博客进行相应搜索!
以及
以及