Virtual machine Ubuntu18.04 TensorFlow CPU version

Source: Internet
Author: User
Tags change settings

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.

    • Workaround

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.

    • Resolution issues:

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

    • Folder sharing issues

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 Common Commands
  1. Conda--version
  2. Conda Update Conda
  3. Conda Create--name mine python=3.6
  4. Conda Remove--name mine--all
  5. Conda Search--full-name python
  6. Conda List
  7. Conda Install NumPy
  8. Conda Remove NumPy
  9. Source Activate mine
  10. Source Deactivate mine
  11. Conda Update NumPy
  12. Conda Update Conda
  13. Conda Update Anaconda
  14. 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
    • Install PIP:

shell sudo apt-get install python-pip python-dev

    • Installing TensorFlow

"' 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
    1. No module named TensorFlow

source activate tensorflow

    1. Modulenotfounderror:no module named ' scipy '

conda install scipy

    1. Modulenotfounderror:no module named ' PIL '

conda install pillow

End

Virtual machine Ubuntu18.04 TensorFlow CPU version

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.