WinPython包管理是否依赖设备?跨设备TensorFlow版本不一致如何修复?
解决WinPython多设备访问时TensorFlow版本不一致的问题
- 先关闭设备B上所有WinPython相关程序(包括IDE、命令行窗口),避免文件被占用。
- 打开服务器上WinPython目录中的
WinPython Command Prompt.exe(设备B通过网络访问打开),执行强制重装命令:pip install tensorflow==2.6 --force-reinstall - 验证版本是否更新成功,在命令行输入:
python -c "import tensorflow as tf; print(tf.__version__)" - 额外检查:如果设备B曾在本地创建过WinPython虚拟环境,确认当前使用的Python路径是服务器上的WinPython目录。可通过命令
where python查看路径,若指向本地环境,切换到服务器的WinPython环境后再重复上述步骤。
内容的提问来源于stack exchange,提问作者adrvs
相关产品推荐
相关产品推荐

