【发布时间】:2020-07-20 23:41:30
【问题描述】:
所以我按照本教程https://www.tensorflow.org/install/pip#windows 并在 venv 上安装了 Tensorflow(它已成功安装)然后我停用了 venv 然后再次加入以检查它是否已安装并且不再存在?
收到这条消息
(venv) C:\Users\eddie>python -c "import tensorflow as tf;print(tf.reduce_sum(tf.random.normal([1000, 1000])))"
2020-07-20 16:33:41.151220: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found
2020-07-20 16:33:41.154540: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
2020-07-20 16:33:42.469966: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'nvcuda.dll'; dlerror: nvcuda.dll not found
2020-07-20 16:33:42.473332: E tensorflow/stream_executor/cuda/cuda_driver.cc:313] failed call to cuInit: UNKNOWN ERROR (303)
2020-07-20 16:33:42.478266: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:169] retrieving CUDA diagnostic information for host: LAPTOP-PV67HTAL
2020-07-20 16:33:42.481952: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:176] hostname: LAPTOP-PV67HTAL
2020-07-20 16:33:42.483927: I tensorflow/core/platform/cpu_feature_guard.cc:143] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2020-07-20 16:33:42.494211: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x29059196c40 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-07-20 16:33:42.499523: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
tf.Tensor(-660.95654, shape=(), dtype=float32)
我注意到他们的安装文档说在我使用完 Tensorflow 之前不要退出 venv,这是否意味着我每次加入同一个 venv 时都需要重新安装它?如果是这种情况,有没有办法保持安装?
对于使用 Tensorflow 的人来说,是否有常规设置?我打算用vscode搭配它,但是这个安装让我很头疼。
【问题讨论】:
标签: python tensorflow virtualenv