Home >Backend Development >Python Tutorial >TensorFlow installation and detailed explanation of jupyter notebook configuration
The following editor will bring you an article on TensorFlow installation and jupyter notebook configuration methods. The editor thinks it’s pretty good, so I’ll share it with you now and give it as a reference. Let’s follow the editor to take a look.
tensorflow uses anaconda to install under ubuntu, jupyter notebook running directory and remote access configuration
Installing Anaconda under Ubuntu
bash ~/file_path/file_name.sh
After permission appears, you can press Ctrl+C to skip, yes agree.
After the installation is completed, you will be asked whether to add the path path, or you can modify the file content yourself
Close the command console and reopen it
python -V
You can view it Whether the installation is successful
Modify the python version of anaconda to meet the tf requirements
conda install python=3.5
Anaconda installs TensorFlow
Get Anaconda's TF source
anaconda search -t conda tensorflow
After waiting, the list will be displayed. I selected the conda-forge/tensorflow source to install
anaconda show conda-forge/tensorflow
will display the current installation information and prompt the instructions that need to be entered to install: conda install --channel XXXX URL
After input, it will prompt for the package information that needs to be installed, enter Y Agree and install.
The download speed of some packages is very slow, you can open lantern first
jupyter notebook usage and configuration
Enter jupyter under Ubuntu Open the notebook
jupyter notebook --generate-config to generate the default configuration file jupyter_notebook_config.py
Default address configuration
Modify the configuration file c.NotebookApp.notebook_dir = 'XXXX'
Remote access
No remote access by default
First generate the login password: open ipython and enter
from notebook.auth import passwd
passwd( ) Enter the password to be set according to the prompts, and copy the generated sha1 password
which needs to be copied completely, for example:
sha1:ce23d945972f:34769685a7ccd3d08c84a18c63968a41f1140274
Modify the configuration file
c.NotebookApp.ip='*' c.NotebookApp.password = u'sha:xxxxxxxxxxxxxxxxxxxxxxxxxx' c.NotebookApp.open_browser = False c.NotebookApp.port =8888
Note that there is * in the ip, and there is u
in front of the password. After the configuration is completed, it can be accessed remotely. After the configuration is completed, it will not pop up automatically when starting the notebook. The webpage needs to be opened manually. After opening, you need to enter the password before you can access it.
Note 1: Ubuntu can use ifconfig to obtain the local IP address
Note 2: The virtual machine can use NAT mode or bridge mode to make the host accessible to the notebook
The above is the detailed content of TensorFlow installation and detailed explanation of jupyter notebook configuration. For more information, please follow other related articles on the PHP Chinese website!