没有这样的文件或目录:'/home/mona/anaconda3/lib/python3.7/site-packages/google_pasta-0.2.0.dist-info/METADATA'

没有这样的文件或目录:'/home/mona/anaconda3/lib/python3.7/site-packages/google_pasta-0.2.0.dist-info/METADATA'

如何在 Ubuntu 20.04 中安装 tensorflow gpu 1.14?

使用以下命令我收到错误

(base) mona@mona:~$ pip install tensorflow-gpu==1.14
Collecting tensorflow-gpu==1.14
  Downloading tensorflow_gpu-1.14.0-cp37-cp37m-manylinux1_x86_64.whl (377.1 MB)
     |████████████████████████████████| 377.1 MB 2.6 kB/s 
Requirement already satisfied: protobuf>=3.6.1 in ./anaconda3/lib/python3.7/site-packages/protobuf-3.12.2-py3.7.egg (from tensorflow-gpu==1.14) (3.12.2)
Collecting tensorflow-estimator<1.15.0rc0,>=1.14.0rc0
  Downloading tensorflow_estimator-1.14.0-py2.py3-none-any.whl (488 kB)
     |████████████████████████████████| 488 kB 14.2 MB/s 
Requirement already satisfied: six>=1.10.0 in ./anaconda3/lib/python3.7/site-packages (from tensorflow-gpu==1.14) (1.15.0)
Requirement already satisfied: absl-py>=0.7.0 in ./anaconda3/lib/python3.7/site-packages/absl_py-0.9.0-py3.7.egg (from tensorflow-gpu==1.14) (0.9.0)
Collecting astor>=0.6.0
  Downloading astor-0.8.1-py2.py3-none-any.whl (27 kB)
Collecting tensorboard<1.15.0,>=1.14.0
  Downloading tensorboard-1.14.0-py3-none-any.whl (3.1 MB)
     |████████████████████████████████| 3.1 MB 18.0 MB/s 
Requirement already satisfied: keras-preprocessing>=1.0.5 in ./anaconda3/lib/python3.7/site-packages (from tensorflow-gpu==1.14) (1.1.2)
Requirement already satisfied: wheel>=0.26 in ./anaconda3/lib/python3.7/site-packages (from tensorflow-gpu==1.14) (0.34.2)
Collecting gast>=0.2.0
  Using cached gast-0.3.3-py2.py3-none-any.whl (9.7 kB)
Requirement already satisfied: wrapt>=1.11.1 in ./anaconda3/lib/python3.7/site-packages (from tensorflow-gpu==1.14) (1.11.2)
Collecting keras-applications>=1.0.6
  Downloading Keras_Applications-1.0.8-py3-none-any.whl (50 kB)
     |████████████████████████████████| 50 kB 4.7 MB/s 
Requirement already satisfied: grpcio>=1.8.6 in ./anaconda3/lib/python3.7/site-packages/grpcio-1.30.0rc1-py3.7-linux-x86_64.egg (from tensorflow-gpu==1.14) (1.30.0rc1)
Requirement already satisfied: termcolor>=1.1.0 in ./anaconda3/lib/python3.7/site-packages (from tensorflow-gpu==1.14) (1.1.0)
Requirement already satisfied: google-pasta>=0.1.6 in ./anaconda3/lib/python3.7/site-packages (from tensorflow-gpu==1.14) (0.2.0)
WARNING: No metadata found in ./anaconda3/lib/python3.7/site-packages
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/home/mona/anaconda3/lib/python3.7/site-packages/google_pasta-0.2.0.dist-info/METADATA'

以下是一些系统信息:

(base) mona@mona:~$ uname -a
Linux mona 5.4.0-40-generic #44-Ubuntu SMP Tue Jun 23 00:01:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
(base) mona@mona:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04 LTS
Release:    20.04
Codename:   focal
(base) mona@mona:~$ python -V
Python 3.7.6
(base) mona@mona:~$ which python
/home/mona/anaconda3/bin/python
(base) mona@mona:~$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:07:16_PDT_2019
Cuda compilation tools, release 10.1, V10.1.243
(base) mona@mona:~$ nvidia-smi
Mon Jul 20 11:51:09 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.100      Driver Version: 440.100      CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce RTX 2070    Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   47C    P8     9W /  N/A |    642MiB /  7982MiB |     17%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1313      G   /usr/lib/xorg/Xorg                           310MiB |
|    0      1759      G   /usr/bin/gnome-shell                         326MiB |
|    0      6030      G   /usr/lib/firefox/firefox                       2MiB |
+-----------------------------------------------------------------------------+

答案1

(base) mona@mona:~$ touch /home/mona/anaconda3/lib/python3.7/site-packages/google_pasta-0.2.0.dist-info/METADATA

解决了基于的问题这个 git 问题答案

相关内容