The process of installing jupyter notebook on MAC

Don’t panic in case of data tilt, teach you to easily obtain the slope of table tilt>>>

Mac desktop

python:mac Comes with Python 2.7.10

1. Upgrade the PIP installation tool: sudo Python – M PIP install — Upgrade — force pip

2. Install setup tools: sudo PIP install setup tools = = 33.1.1

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

4. Installation six:sudo pip install –ignore-installed six

5. Install jupyter: sudo install jupyter

Start command: input Jupiter notebook directly in the terminal

It took me a long time to do a good job. The above commands are used when there are various problems during installation. Write down the problems and corresponding solutions below

1.ImportError: cannot import name _ Thread report this error solution:

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

2.File “/Library/Python/2.7/site-packages/dateutil/tz/_ common.py”, line 2, in < module>

from six.moves import _ thread
ImportError: cannot import name _ thread

Solution: install the six command again

After solving the above problem, an error will still be reported when starting. This is a stubborn error

File “/Library/Python/2.7/site-packages/packaging/requirements.py”, line 59, in < module>

MARKER_ EXPR = originalTextFor(MARKER_ EXPR())(“marker”)

TypeError: __ call__() takes exactly 2 arguments (1 given)

Solution: find the file in the path directly according to the error information, open the file and modify the function in line 59

59:#MARKER_ EXPR = originalTextFor(MARKER_ EXPR())(“marker”)
60:MARKER_ EXPR = originalTextFor(MARKER_ EXPR(“marker”))

After modification, directly save the file and run the jupyter notebook command again to start jupyter

As for the problem of sixs, we need to delete the sixs in our default path. Otherwise, even if the update is successful, the latest sixs will not be used

Method: first check 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, use the above command to install and update the six

Similar Posts: