conda update conda pip install tf-nightly-gpu-2.0-preview conda install https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64/cudnn-7.3.1-cuda10.0_0.tar.bz2 conda install https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64/cudatoolkit-10.0.130-0.tar.bz2 illustrate:
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64/cudnn-7.3.1-cuda10.0_0.tar.bz2 conda install cudnn-7.3.1-cuda10.0_0.tar.bz2 Errors and solutions Old library problem ERROR: Cannot uninstall 'wrapt'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall. The old version has many dependencies and cannot be deleted clearly. In this case, you should ignore the old version upgrade, which is the following solution: pip install tf-nightly-gpu-2.0-preview --ignore-installed wrapt NumPy version problem Another problem is that there is an old version of numpy. You can use pip to uninstall numpy until it prompts that there is nothing to uninstall, and then reinstall numpy Driver issues
This is because the driver version does not match. You can download the cuda10.0 driver (which is the same as above) from the NVIDIA official website. Installation command: View the results: Testing and other Tests available: import tensorflow as tf print(tf.__version__) print(tf.keras.__version__) if tf.test.is_gpu_available(): device = "/gpu:0" else: device = "/cpu:0" print(device) Reduce tensorflow output information TensorFlow has four levels of log information, in ascending order of importance: INFO (notification) < WARNING (warning) < ERROR (error) < FATAL (fatal) tf.compat.v1.logging.set_verbosity('ERROR') or import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' Tensorflow2.0 prompts problems under pycharm Tensorflow2.0 usually uses keras through tensorflow.keras, but pycharm does not prompt it. The reason is that the actual keras path is placed in tensorflow/python/keras, but there is no python directory in tensorflow in the program. The solution is as follows: try: import tensorflow.python.keras as keras except: import tensorflow.keras as keras In this way, Pycharm can have prompts, and there is no need to modify the code when the program is running. Summarize The above is the editor's introduction to solving the Linux Tensorflow2.0 installation problem. I hope it will be helpful to everyone. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: A brief analysis of MySQL explicit type conversion
>>: Best Practices for MySQL Upgrades
Today, when I was using Nginx, a 500 error occurr...
The following problem occurred when installing my...
Table of contents 1. Write Webshell into outfile ...
Table of contents Conclusion first question Solut...
Table of contents 1. Instructions 2. Modifiers 3....
This article shares the installation tutorial of ...
This article shares the specific code of the WeCh...
Table of contents Functionalcomponents Childcompo...
Understand this Perhaps you have seen this in oth...
Problem Description I want to use CSS to achieve ...
The so-called sliding door technology means that ...
[LeetCode] 196.Delete Duplicate Emails Write a SQ...
In the trend of gradual transition from tradition...
Do you know what fonts are used in the logo desig...
This article example shares the specific code of ...