The process of installing Jupyter notebook on Mac

Source: Internet
Author: User
Tags jupyter jupyter notebook

Let's talk about the environment:

Mac Desktops

Python:mac comes with Python 2.7.10

1. First upgrade PIP installation tool: sudo python-m pip install--upgrade--force pip

2. Install Setuptools tool: sudo pip install setuptools==33.1.1

3. Install python-dateutil:sudo pip Install python-dateutil==2.2

4. Installing Six:sudo pip install--ignore-installed Six

5. Installing Jupyter:sudo Install Jupyter

Start command: Enter Jupyter notebook directly in the terminal

Toss for a long time, just do well, the above commands are encountered in the installation of a variety of problems when used, the following write a record of the problems encountered and corresponding solutions

1.importerror:cannot Import Name _thread report this error solution:

sudo pip uninstall python-dateutilsudo pip install python-dateutil==2.2

2.File "/library/python/2.7/site-packages/dateutil/tz/_common.py", line 2, <module>

From six.moves import _thread
Importerror:cannot Import Name _thread

Workaround: Install the six command above

Solve the above problem when the start of the error will still be a bug this is a stubborn mistake:

File "/library/python/2.7/site-packages/packaging/requirements.py", line-in <module>

marker_expr = Originaltextfor (marker_expr ()) ("MARKER")

TypeError: __call__ () takes exactly 2 arguments (1 given)

Workaround: Locate the file in the path directly based on the error message, and open the file to modify the function in line 59

: #MARKER_EXPR = Originaltextfor (marker_expr ()) ("MARKER")
60:marker_expr = Originaltextfor (marker_expr ("MARKER"))

Once modified, save the file directly and run the Jupyter Notebook command again to start the jupyter.

On the question of six, there is a need to delete the six under our default path, or even if the update succeeds, it will not use the latest six

Method: First look at the default six path

Import Six

Print Six. __file__

Then delete:sudo rm -rf /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six.*

Finally, install update six using the command above

Well, it's not very good to write, just record it.

The process of installing Jupyter notebook on Mac

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.