Buy Huawei cloud servers student package contains the following resources
in accordance with the console prompt to configure port
Log in as root, add ordinary user
useradd -m 用户名 -s /bin/bash
Useradd command to add a parameter, use the -m before the user name, you can add the default home directory for the user (if you do not add a home directory, the user will be unable to create a file). Use -m parameter -s parameter also need to specify the position of the shell (the shell without adding position, the user's default shell is sh, its function is relatively weak)
Set user password
passwd 用户名
Add the user to the sudoers file
chmod 777 /etc/sudoers #修改文件权限
vim /etc/sudoers #修改sudoers file
#在root ALL=(ALL:ALL) ALL 下面添加一行
用户名 ALL=(ALL)ALL
#保存退出
chmod 440 /etc/sudoers #改回文件权限
Landing ordinary users, download anaconda
wget https://repo.continuum.io/archive/Anaconda3-5.0.1-Linux-x86_64.sh
Installation Anaconda (enter yes)
bash Anaconda3-5.0.1-Linux-x86_64.sh
Check if successful
re-open the terminal, check python version is python3
python --version
Creating tenflow development environment
conda create -n tensorflow python=3.6
Activation environment
source activate tensorflow
installationSuitableTensorflow version of
a tutorial recommends installing the latest version of tensorflow unsafe to do so,
may result in run-time
“Your CPU supports instructions that this TensorFlow binary was not
compiled to use: AVX2 FMA”
caveat
Method a:
Select the appropriate version to download for
the proper method should refer
https://blog.csdn.net/wlwlomo/article/details/82806118
Act II:
Queries can install version
pip install tensorflow==
Select the appropriate version for installation
Check whether the installation was successful
import tensorflow as tf
If there
Conversion of the second argument of issubdtype from
float
to
np.floating
is deprecated. In future, it will be treated as
np.float64 == np.dtype(float).type
.
Consider upgrading h5py package:
pip install --upgrade h5py
Reference: https://blog.csdn.net/selfimpro_001/article/details/90174633
If there
importerror: Something is wrong with the numpy installation. While importing we detected an older version of numpy in …One method of fixing this is to repeatedly uninstall numpy until none is found, then reinstall this version.
Repeat
pip uninstall numpy
All versions have to be uninstalled until the numpy
Download numpy
pip install numpy<1.17
Note: There must be <1.17 as of version
pip install numpy==1.16.4
Otherwise there will be error (When this error installed Anaconda in local Win10 systems also appeared to be solved in the same way in tensorflow2 environment)
FutureWarning: Passing (type, 1) or ‘1type’ as a synonym of type is deprecated; in a future ver…
Reference
https://blog.csdn.net/mao_hui_fei/article/details/89318038
https://www.jianshu.com/p/945290726335
The issue of virtual environments:
Activating the ambient environment and disposal:
source activate tensorflow
source deactivate tensorflow
Shared environment: the name of the python package environments currently used to package contained.
conda env export > 文件名.yaml
Loading others shared environment.
conda env update -f=/path/文件名.yml
matplotlib library
If there is an error:
ImportError: No module named ‘matplotlib’
Installed in tensorflow environment
python -m pip install matplotlib
Reference: https://ask.csdn.net/questions/372790
If an error occurs when you call his son Library matplotlib.pyplot:
import matplotlib.pyplot as plt
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
Solution:
Act a :(not suggested)
import matplotlib
matplotlib.use("Agg")//默认值为Qt5Agg,适用于有安装图形界面的系统
import matplotlib.pyplot as plt
Reference
https://www.cnblogs.com/ddhj/p/3665141.html
Act II :(recommend)
Installation GUI
Reference:
https://support.huaweicloud.com/ecs_faq/ecs_faq_0710.html
https://blog.csdn.net/networken/article/details/88938304