The solution to the coexistence of anaconda2 and anaconda3 in Ubuntu16.04
1. Type in the terminal
conda create -n py27 python=2.7 anacondaactivates the py2.7 environment
source activate py27
closes the 2.7 environment
source deactivate.
1.2 jupyter notebook switches the kernel
$python2 -m pip install ipykernel
$python2 -m ipykernel install --user
1.3 installs various packages in sequence
conda install nibabel
conda install nipype
sckit-image == 0.13.0
sckit-learn == 0.18.1
2. Install theano, tensorflow, keras,
https://blog.csdn.net/m984789463/article/details/77074451
error: To use MKL 2018 with Theano you MUST set "MKL_THREADING_LAYER=GNU" in your environement.
Solution
conda install mkl=2017
export MKL_THREADING_LAYER=GNU
3. Install tensorflow-gpu
conda install tensorflow-gpu
3.1 After installation, check the version of tensorflow-gpu
Enter python and enter the python command line
import tensorflow as tf
tf.__version__
print('default gpu device {}'.format(tf.test.gpu_device_name()))
query The tensorflow installation path is:
tf.__path__
Check whether tensorflow uses gpu for calculation
import tensorflow as tf
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
4. Data
decompression data from /data to /input
unzip /data /datasets.zip -d /input/datasets
5. Solve MKL2018
conda install mkl=2017
6.keras import error
import tensorflow.python.ops.tensor_array_ops
7.ubuntu recursively decompress the gz file in the folder
gunzip -r /your/path
Translating...