Instalación de TensorFlow en Ubuntu16.04 y muchos advertencias -- software-installation campo con python campo con tensorflow camp askubuntu Relacionados El problema

Installing TensorFlow on ubuntu16.04 and lots of warnnings


0
vote

problema

Español

Medio ambiente: Ubuntu ABCDEFGHIJKLMNABCDEFGHIJKLMN12 / TENSORFLOW ABCDEFGHIJKLMNABCDEFGHIJKLMN13 / PYTHON ABCDEFGHIJKLMNABCDEFGHIJKLMN14

Instalé TensorFlow usando este comando.

  XDG_CONFIG_DIRS=/etc/xdg/xdg-$VARIANT:/etc/xdg 5  

Este es el resultado de ello.

  XDG_CONFIG_DIRS=/etc/xdg/xdg-$VARIANT:/etc/xdg 6  

En este momento hay una advertencia de Python2

En realidad, quiero usar TensorFlow en Python3 Creo que debido a la instalación de TensorFlow en Python2. Hay muchos comentarios sobre el aviso.

  XDG_CONFIG_DIRS=/etc/xdg/xdg-$VARIANT:/etc/xdg 7  

y traté de ignorarlo.

  ABCDEFGHIJKLMNABCDEFGHIJKLMN18   

¡Es funciona (?), ¿Y por qué hay mucha advertencia?

Original en ingles

Environment : Ubuntu 16.04 / tensorflow 1.14.0/ python 3.5.3

I installed TensorFlow using this command.

sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.7.1-cp27-none-linux_x86_64.whl 

This is the result of it.

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support WARNING: The directory '/home/hanbit-o/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. WARNING: The directory '/home/hanbit-o/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Collecting tensorflow==0.7.1 from https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.7.1-cp27-none-linux_x86_64.whl   Downloading https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.7.1-cp27-none-linux_x86_64.whl (13.8MB) Requirement already satisfied, skipping upgrade: wheel in /usr/local/lib/python2.7/dist-packages (from tensorflow==0.7.1) (0.33.4) Requirement already satisfied, skipping upgrade: protobuf==3.0.0b2 in /usr/local/lib/python2.7/dist-packages (from tensorflow==0.7.1) (3.0.0b2) Requirement already satisfied, skipping upgrade: six>=1.10.0 in /usr/lib/python2.7/dist-packages (from tensorflow==0.7.1) (1.10.0) Requirement already satisfied, skipping upgrade: numpy>=1.8.2 in /home/hanbit-o/.local/lib/python2.7/site-packages (from tensorflow==0.7.1) (1.16.4) Requirement already satisfied, skipping upgrade: setuptools in /usr/lib/python2.7/dist-packages (from protobuf==3.0.0b2->tensorflow==0.7.1) (20.7.0) Installing collected packages: tensorflow   Found existing installation: tensorflow 0.7.1     Uninstalling tensorflow-0.7.1:       Successfully uninstalled tensorflow-0.7.1 Successfully installed tensorflow-0.7.1 

in this time there is a warning of python2

Actually, I want to use TensorFlow at the python3 I think because of installing TensorFlow at python2. There are lots of comments on the prompt.

Python 3.5.3 (default, Aug 28 2019, 20:35:32)  [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import tensorflow /home/hanbit-o/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.   _np_qint8 = np.dtype([("qint8", np.int8, 1)]) /home/hanbit-o/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.   _np_quint8 = np.dtype([("quint8", np.uint8, 1)]) /home/hanbit-o/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.   _np_qint16 = np.dtype([("qint16", np.int16, 1)]) /home/hanbit-o/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.   _np_quint16 = np.dtype([("quint16", np.uint16, 1)]) /home/hanbit-o/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.   _np_qint32 = np.dtype([("qint32", np.int32, 1)]) /home/hanbit-o/.local/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.   np_resource = np.dtype([("resource", np.ubyte, 1)]) /home/hanbit-o/.local/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.   _np_qint8 = np.dtype([("qint8", np.int8, 1)]) /home/hanbit-o/.local/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.   _np_quint8 = np.dtype([("quint8", np.uint8, 1)]) /home/hanbit-o/.local/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.   _np_qint16 = np.dtype([("qint16", np.int16, 1)]) /home/hanbit-o/.local/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.   _np_quint16 = np.dtype([("quint16", np.uint16, 1)]) /home/hanbit-o/.local/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.   _np_qint32 = np.dtype([("qint32", np.int32, 1)]) /home/hanbit-o/.local/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.   np_resource = np.dtype([("resource", np.ubyte, 1)]) >>>  

and i tried to ignore it.

>>> hello = tf.constant('Hello, TensorFlow!') >>> sess = tf.Session() 2019-10-09 21:40:31.902027: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA 2019-10-09 21:40:31.926393: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 3398000000 Hz 2019-10-09 21:40:31.929440: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x42f31d0 executing computations on platform Host. Devices: 2019-10-09 21:40:31.929480: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): <undefined>, <undefined> >>> sess.run(hello) ]b'Hello, TensorFlow!' >>> a = tf.constant(10) >>> b = tf.constant(32) >>> sess.run(a+b) 2019-10-09 21:41:28.143676: W tensorflow/compiler/jit/mark_for_compilation_pass.cc:1412] (One-time warning): Not using XLA:CPU for cluster because envvar TF_XLA_FLAGS=--tf_xla_cpu_global_jit was not set.  If you want XLA:CPU, either set that envvar, or use experimental_jit_scope to enable XLA:CPU.  To confirm that XLA is active, pass --vmodule=xla_compilation_cache=1 (as a proper command-line flag, not via TF_XLA_FLAGS) or set the envvar XLA_FLAGS=--xla_hlo_profile. 42 

It is works(?), and why there lots of warnning?

        
 
 

Lista de respuestas

1
 
vote
vote
La mejor respuesta
 

Primero, para usar TensorFlow con Python 3, debe instalarlo usando pip3 . Si no tiene ABCDEFGHIJKLMNABCDEFGHIJKLMN10 instalado, puede instalarlo usando sudo apt update && auso apt upgrade && sudo apt remove mate-terminal && sudo apt install mate-terminal1
Luego, simplemente puede instalar TensorFlow ejecutando el siguiente comando ABCDEFGHIJKLMNABCDEFGHIJKLMN12 , no necesita usar sudo.

Segundo, tiene las advertencias debido a la versión nompy, es probable que tenga una versión adormecida (1.17 o 1.15) que no es compatible con la versión de TensorFlow que instaló.
Así que para resolver estas advertencias, puedes:

  • Instale TensorFlow 2.0 que funciona bien con la última versión de NOMPY. El comando es sudo apt update && auso apt upgrade && sudo apt remove mate-terminal && sudo apt install mate-terminal3

o

  • degradando el número a 1.13.3 y lt; = #14.5 y mantenga la versión actual de TensorFlow. El CAMMAND ES ABCDEFGHIJKLMNABCDEFGHIJKLMN14

n.b: Las advertencias que usted no quiere decir que su instalación haya fallado. TensorFlow funciona bien, simplemente puede ignorarlos y todo funcionará bien.

 

First, to use tensorflow with python 3, you have to install it using pip3. If you don't have pip3 installed, you can install it using sudo apt install python3-pip
Then, you can simply install tensorflow by running the following command pip3 install tensorflow, you don't need to use sudo.

Second, you have the warnings because of the numpy version, you probably have numpy version (1.17 or 1.15) that is not supported by the version of tensorflow that you installed.
So to solve these warnings, you can:

  • Install tensorflow 2.0 which works fine with the latest version of numpy. The command is pip3 install --upgrade tensoflow

OR

  • Downgrade the numpy to 1.13.3<=numpy<=1.14.5 and keep the current version of tensorflow. The cammand is pip3 install nupmpy==1.14

N.B: The warnings that you have do not mean that your installation failed. Tensorflow works fine, you can simply ignore them and everything will work fine.

 
 

Relacionados problema

1  ¿Cuál es la diferencia entre CUDA-TOOLKET-10-1 y NVIDIA-CUDA-TOOLKIT cuando lo instalo en Ubuntu 20.04?  ( What is the difference between cuda toolkit 10 1 and nvidia cuda toolkit when i ) 
Fondo de mis preguntas Tengo una computadora portátil de Lenovo Thinkpad W530 de Lenovo con NVIDIA Corporation GK107GLM [Quadro k1000m ] / Quadro k1000m / ...

2  Ubuntu 18.04 TensorFlow / KERAS Problemas de instalación, ¿puede alguien ayudar a alguien?  ( Ubuntu 18 04 tensorflow keras installation issues can someone help ) 
Estoy muy interesado en las redes neuronales y actualmente estoy tratando de instalar y obtener TensorFlow y Keras en funcionamiento. Por supuesto, quiero cor...

0  Conexión con cable detectada pero sin acceso a Internet en Ubuntu 14.04 LTS  ( Failed to get convolution algorithm error in tensorflow ) 
Error al obtener un error de algoritmo de convolución en TensorFlow 0123456789012345222 Instalé CUDA, CUDANN y TENSORFLOW, siguiendo estrictamente las instr...

1  Instalación de CUDA 10 y TENSORFLOW 2.0 Ubuntu 19.10  ( Installing cuda 10 and tensorflow 2 0 ubuntu 19 10 ) 
He estado tratando de instalar CUDA 10.0 y TENSRFLOW 2.0 en Ubuntu 19.10 (lo mismo ocurre con las versiones anteriores de Ubuntu), pero no hay uso. Dice que e...

1  Instalación del kit de herramientas de CUDA para Ubuntu 18.04  ( Installing cuda toolkit for ubuntu 18 04 ) 
Necesito que CUDA desarrolle un Chatbot como se describe en este Tutorial . Estoy tratando de instalar CUDA usando estos comandos . Tipo de instalación: R...

0  Ubuntu 18.04.3: Necesito ayuda con Rocm TensorFlow: Error de compilación  ( Ubuntu 18 04 3 need help with rocm tensorflow build error ) 
Tengo una nueva instalación de Ubuntu 18.04.3 y estoy tratando de instalar TensorFlow-Rocm (para AMD GPU) versión 1.14.0. Instalación PIP3 predeterminada Te...

1  NVIDIA GPU no se está ejecutando  ( Nvidia gpu is not running ) 
Estoy usando Ubuntu 16.04 y mi versión NVIDIA GPU es "GP104 [GEFORCE GTX 1080]". Instalé CUDA y su versión es "CUDA Versión 9.0.176". y al ejecutar el com...

0  Importar TensorFlow como falla de segmentación de TF (Core Dumped) en Ubuntu 20.04  ( Import tensorflow as tf segmentation fault core dumped in ubuntu 20 04 ) 
Necesito instalar TensorFlow 1.14 para DEEPLABCUT y Tengo una falla de segmentación. ¿Cómo lo arreglo? También prefiero instalar la versión GPU. No estoy se...

1  Instalación de Rocm con Radeon R7 M445 en Ubuntu 20.04  ( Rocm installation with radeon r7 m445 on ubuntu 20 04 ) 
Acabo de hacer una nueva instalación de Ubuntu 20.04 e hizo un intento de instalar ROCM para la computación GPU en AMD Radeon R7 M445. Lo necesito para usar l...

1  Error de importación TensorFlow 1037  ( Tensorflow import error 1037 ) 
Déjame decir esto justo al principio, soy nuevo en esto y no tengo idea de lo que se debe hacer. Estoy usando Ubuntu 19.04. Y estoy seguro de que tengo todo...




© 2022 respuesta.top Reservados todos los derechos. Centro de preguntas y respuestas reservados todos los derechos