Virtual machine Ubuntu18.04 TensorFlow CPU version virtual machine vmware
Configuration:
- 20G capacity, expandable
- 2G memory, expandable
- The network uses NAT mode
- Platform: Win10 under the Ubuntu18.04
Problems that arise
- Network connectivity Issues
After the installation of VMware, you need to open all its services, normal connection should be the upper right corner of the three square sign, if not, it indicates a network problem.
Locate the service on your local computer and open all services starting with the VM
In addition, if you have already modified the network link problem, then
Edit, virtual network Editor, change settings (lower-right corner), restore default settings
Generally it can be solved, if not, you can refer to other blogs.
Install VMware Tools (typically a reminder, or you can find it in the Virtual Machines tab)
Unzip and run the file with the suffix named pl directly.
shell ./vmware-install.pl
Virtual machine Settings Options shared folder
Always enabled
Add Folder
Installing Anaconda
- It is usually downloaded from the Tsinghua Park, address https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/
- Download complete in less than 20 minutes
- Installation
bash Anaconda **** .sh
- Anaconda Remote Warehouse Mirroring
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/conda config --set show_channel_urls yes
- Conda--version
- Conda Update Conda
- Conda Create--name mine python=3.6
- Conda Remove--name mine--all
- Conda Search--full-name python
- Conda List
- Conda Install NumPy
- Conda Remove NumPy
- Source Activate mine
- Source Deactivate mine
- Conda Update NumPy
- Conda Update Conda
- Conda Update Anaconda
- Conda Update python
- Problems that you may encounter
- The package is damaged, download the latest version again, delete the Anaconda folder, and delete the environment variable.
- Conda command does not exist, check environment variables,. bashrc file, last line, generally speaking, may be Anaconda version such as ANACONDA2, ANACONDA3 cause the environment cannot be found. Modify it and you can use it normally.
Installing TensorFlow
shell sudo apt-get install python-pip python-dev
"' Shell
Conda create-n TensorFlow python=3.6
wget HTTPS://STORAGE.GOOGLEAPIS.COM/TENSORFLOW/LINUX/CPU/TENSORFLOW-1.0.0-CP36-CP36M-LINUX_X86_64.WHL
MV TENSORFLOW-1.0.0-CP36-CP36M-LINUX_X86_64.WHL TENSORFLOW-1.0.0-PY3-NONE-LINUX_X86_64.WHL #重命名
SOURCE Activate TensorFlow
CD Downloads
Pip Install--ignore-installed--upgrade TENSORFLOW-1.0.0-PY3-NONE-LINUX_X86_64.WHL
```
- Verify that the installation is successful
python (tensorflow)$ python import tensorflow as tf hello = tf.constant(‘Hello, TensorFlow!‘) sess = tf.Session() sess.run(hello)
- However, the use of TensorFlow in the Spyder or Pycharm is not recognized at this time.
打开你的anaconda文件夹,找到envs 打开tensorflow 将sitepack-ages里面的东西都考到 anaconda/lib/python2.7/sitepack-ages
Reference content
Https://www.cnblogs.com/tiansheng/p/7281290.html
Run the Neural-style program with the environment
# 将库文件下载git clone https://github.com/anishathalye/neural-style# 安装vgg19wget http://www.vlfeat.org/matconvnet/models/beta16/imagenet-vgg-verydeep-19.mat
Preparatory work
sudo apt-get updatesudo apt-get install python-pip python-dev python-scipy git
Begin
cd ~/workspace/neural-style-master/python neural_style.py --content ./examples/1-content.jpg --styles ./examples/1-style.jpg --output ./examples/outtest.jpg
Error
- No module named TensorFlow
source activate tensorflow
- Modulenotfounderror:no module named ' scipy '
conda install scipy
- Modulenotfounderror:no module named ' PIL '
conda install pillow
End
Virtual machine Ubuntu18.04 TensorFlow CPU version