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
I am using LDAP user management implemented in Ce...
In actual use, it is often necessary to share the...
Preface Because this is a distributed file system...
For more exciting content, please visit https://g...
【Foreword】 If you want to use ORM to operate data...
Table of contents Implementing a search engine ba...
In HTML pages, we sometimes need to automatically ...
XML/HTML CodeCopy content to clipboard <!DOCTY...
Table of contents 1. MySQL replication process 2....
Table of contents 1. Pull the image 2. Create a R...
MySQL replication table detailed explanation If w...
Table of contents cycle for for-in for-of while d...
Table of contents Discover: Application of displa...
The mini program implements a complete shopping c...
Keepalived+Nginx+Tomcat to achieve high availabil...