In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the "installation and use of Jupyter tutorial". In daily operation, I believe many people have doubts about the installation and use of Jupyter. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "installation and use of Jupyter". Next, please follow the editor to study!
1. Introduction of Jupyter
Jupyter Notebook is essentially a Web application that makes it easy to create and share literary program documents, supporting real-time code, mathematical equations, visualization, and markdown. Uses include: data cleaning and conversion, numerical simulation, statistical modeling, machine learning and so on. Advantages: easy to use, easy to use.
II. Installation
1. Installation method. Install using pip directly in windows and cmd.
Pip install juputer
Note: Python 3.3or later, or Python 2.7is required for Jupyter installation.
# upgrade
Pip3 install-upgrade pip
The installation process is relatively long, which probably requires 5min or so.
two。 Run after installation is complete
Jupyter notebook
If the installation is normal, it may not go wrong. Remind me when I install it here.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use-no-warn-script-location.
So run the error message:
ModuleNotFoundError: No module named 'markupsafe._compat'
It was suggested that the markupsafe._compat module could not be found, so I went to the directory Python36\ Lib\ site-packages\ markupsafe. Sure enough, I didn't have the file _ compat, and then I uninstalled the markupsafe module and reinstalled it. I still can't Google it (it seems to be popular now, ), and find the contents of the file _ compat:
#-*-coding: utf-8-*-
"
Markupsafe._compat
~
Compatibility module for different Python versions.
: copyright: (C) 2013 by Armin Ronacher.
: license: BSD, see LICENSE for more details.
"
Import sys
PY2 = sys.version_info [0] = 2
If not PY2:
Text_type = str
String_types = (str,)
Unichr = chr
Int_types = (int,)
Iteritems = lambda x: iter (x.items ())
Else:
Text_type = unicode
String_types = (str, unicode)
Unichr = unichr
Int_types = (int, long)
Iteritems = lambda x: x.iteritems ()
Create a new file _ compat.py in the directory Python36\ Lib\ site-packages\ markupsafe, write and save the above contents, and then run jupyther under cmd to smooth:
C:\ Users\ 82055\ Desktop > jupyter notebook
NotebookApp] Writing notebook server cookie secret to C:\ Users\ 82055\ AppData\ Roaming\ jupyter\ runtime\ notebook_cookie_secret
Serving notebooks from local directory: C:\ Users\ 82055\ Desktop
[I 17:34:02.760 NotebookApp] 0 active kernels
[I 17:34:02.761 NotebookApp] The Jupyter Notebook is running at:
[I 17gh34 NotebookApp 02.761] http://localhost:8888/?token=7d96ee52f2c5c5c451af05e15d6f6cb626b1a6783b590117
[I 17 twice to skip confirmation 34 NotebookApp 02.762 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 17:34:02.764 NotebookApp]
Automatically jumps to the page (web page) by default
III. Basic use
1. Modify the default directory
(1) find the path of jupyter configuration file
C:\ Users\ 82055\ Desktop > jupyter notebook-- generate-config
Writing default config to: C:\ Users\ 82055\ .jupyter\ jupyter_notebook_config.py
(2) find the configuration file and change the default directory
# # The directory to use for notebooks and kernels.
C.NotebookApp.notebook_dir ='H:\ PyCoding'
Start jupyter again and find that the main page file is the file in the folder we specified. (defaults to computer desktop files)
At this point, the study on the "installation and use of Jupyter tutorial" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.