-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInstalación de librerías.txt
74 lines (49 loc) · 7.08 KB
/
Instalación de librerías.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
Windows: se recominda utilizar Ubuntu on Windows para realizar la instalacion, ya que de otro modo se encontraran algunos errores de dependencias y la compilación no será optima. Si de cualquier manera desea instalar python, TensorFlow y Keras sobre windows, puede consultar la siguiente bibliografia:
• Python 3.5.2 --> https://www.python.org/downloads/release/python-352/
• Python extension packages --> http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy
• Tensorflow --> https://www.tensorflow.org/install/install_windows
https://chunml.github.io/ChunML.github.io/project/Tensorflow-Installation/
• Keras --> http://www.pyimagesearch.com/2016/11/14/installing-keras-with-tensorflow-backend/
Ubuntu: Normalmente Python ya viene pre instalado en ubuntu, de todas maneras se recomienda actualizar el sistema.
sudo apt-get update sudo apt-get -y upgrade
python3 -V
la ultima instruccion nos devolvera la version de python como salida como comprobacion de que está instalado. A continuacion se instalará pip con el que se podrán manejar los paquetes instalados en python
sudo apt-get install -y python3-pip
Instalación de TensorFlow.
Se recomienda realizar la instalacion en un entorno virtual. para ello
sudo apt-get install python3-pip python3-dev python-virtualenv
virtualenv --system-site-packages -p python3 $targetDirectory$
where targetDirectory specifies the top of the virtualenv tree. Our instructions assume that targetDirectory is ~/tensorflow, but you may choose any directory.
activar el entorno virtual con
source ~/tensorflow/bin/activate
The preceding source command should change your prompt to the following:
(tensorflow)$
Ensure pip ≥8.1 is installed:
(tensorflow)$ easy_install -U pip
Issue one of the following commands to install TensorFlow in the active virtualenv environment:
(tensorflow)$ pip install --upgrade tensorflow # for Python 2.7
(tensorflow)$ pip3 install --upgrade tensorflow # for Python 3.n
(tensorflow)$ pip install --upgrade tensorflow-gpu # for Python 2.7 and GPU
(tensorflow)$ pip3 install --upgrade tensorflow-gpu # for Python 3.n and GPU
If the preceding command fails
(tensorflow)$ pip3 install --upgrade tfBinaryURL # Python 3.n
where tfBinaryURL identifies the URL of the TensorFlow Python package. The appropriate value of tfBinaryURLdepends on the operating system, Python version, and GPU support. Find the appropriate value for tfBinaryURL for your system --> https://www.tensorflow.org/install/install_linux#the_url_of_the_tensorflow_python_package
When you are done using TensorFlow, you may deactivate the environment by invoking the deactivate function as follows:
(tensorflow)$ deactivate
Validate your installation
Start a terminal.
If you installed through Anaconda, activate your Anaconda environment.
Invoke python from your shell as follows:
$ python
Enter the following short program inside the python interactive shell:
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
>>> print(sess.run(hello))
If the system outputs the following, then you are ready to begin writing TensorFlow programs:
Hello, TensorFlow!
Instalacion Keras:
instalar las dependencias con pip3
numpy, scipy yaml HDF5 and h5py (optional, required if you use model saving/loading functions) pillow sudo pip install keras
descargar un paquete con las librerias AVX, FMA, SSE de https://github.com/lakshayg/tensorflow-build
pip install --ignore-installed --upgrade /path/to/binary.whl