tensorflow 2,8 安装在环境中,但是当我运行笔记本时,它打印出 tf 版本为 2.3
我使用conda创建了一个环境并安装了tensorflow 2.8和CUDA。我使用的是 python 版本 3.8.1。在终端中,我激活了环境并输入 pip show tensorflow,它按预期打印出版本 2.8。现在,我在该环境中打开一个 jupyter 笔记本并运行代码来检查 GPU,它找到了它。然后我运行
print(tf.__version__)
并打印出 2.3.0。为什么显示不同的版本?
I created an environment using conda and installed tensorflow 2.8 and CUDA. I am using python version 3.8.1. In a terminal I activated the environment and typed pip show tensorflow and it prints out version 2.8 as expected. Now I open a jupyter notebook in that environment and run the code to check for the gpu and it finds it. Then I ran
print(tf.__version__)
and it prints out 2.3.0. Why is it showing a different version?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我尝试了各种方法,但无法解决问题。所以我决定从头开始。我删除了 anaconda/ 我删除了所有版本的 CUDA 工具包和 Cundd。我确保所有这些目录都已删除。我从引用 cuda 路径的路径中删除了所有环境变量。然后我重新安装了 anaconda 并创建了一个新的虚拟环境(我忘记了我还删除了所有 anaconda 生成的目录)。然后我按照确切的步骤安装了tensorflow、CUdatoolit和cudnn。然后一切都按预期进行。
well I tried all kinds of stuff and could not solve the problem. So I decided to start from scratch. I remove anaconda/ I remove all versions of the CUDA toolkit and Cundd. I made sure all those directories were deleted. I remove all the environmental variables from path that reference the cuda paths. Then I re installed anaconda and create a new virtual environment(I forget I also deleted all anaconda generated directories). Then I followed the exact procedure to install tensorflow , the CUdatoolit and cudnn. Then all worked as it should.