我无法在jupyter笔记本中运行内核
$ conda info
active environment : None
user config file : /home/jazzy/.condarc
populated config files :
conda version : 4.5.4
conda-build version : not installed
python version : 2.7.15.final.0
base environment : /data/jazzy/miniconda2 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/linux-64
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/pro/linux-64
https://repo.anaconda.com/pkgs/pro/noarch
package cache : /data/jazzy/miniconda2/pkgs
/home/jazzy/.conda/pkgs
envs directories : /data/jazzy/miniconda2/envs
/home/jazzy/.conda/envs
platform : linux-64
user-agent : conda/4.5.4 requests/2.19.1 CPython/2.7.15 Linux/3.19.0-51-generic ubuntu/14.04 glibc/2.19
UID:GID : 1010:1010
netrc file : None
offline mode : False
启动内核或任何现有内核重新启动时,出现以下错误
[I 14:02:45.495 NotebookApp] KernelRestarter: restarting kernel (4/5), new random ports
WARNING:root:kernel 8e593d3c-c364-41ba-8b2d-187c165c52ab restarted
Traceback (most recent call last):
File "/data/jazzy/miniconda2/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/data/jazzy/miniconda2/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/data/jazzy/miniconda2/lib/python2.7/site-packages/ipykernel_launcher.py", line 15, in <module>
from ipykernel import kernelapp as app
File "/data/jazzy/miniconda2/lib/python2.7/site-packages/ipykernel/__init__.py", line 2, in <module>
from .connect import *
File "/data/jazzy/miniconda2/lib/python2.7/site-packages/ipykernel/connect.py", line 13, in <module>
from IPython.core.profiledir import ProfileDir
File "/data/jazzy/miniconda2/lib/python2.7/site-packages/IPython/__init__.py", line 48, in <module>
from .core.application import Application
File "/data/jazzy/miniconda2/lib/python2.7/site-packages/IPython/core/application.py", line 23, in <module>
from traitlets.config.application import Application, catch_config_error
File "/data/jazzy/miniconda2/lib/python2.7/site-packages/traitlets/__init__.py", line 1, in <module>
from .traitlets import *
File "/data/jazzy/miniconda2/lib/python2.7/site-packages/traitlets/traitlets.py", line 43, in <module>
import contextlib
File "/data/jazzy/miniconda2/lib/python2.7/contextlib.py", line 4, in <module>
from functools import wraps
File "/data/jazzy/Embeddings/synonyms/utils/functools.py", line 5, in <module>
import matplotlib
File "/data/jazzy/miniconda2/lib/python2.7/site-packages/matplotlib/__init__.py", line 105, in <module>
import six
File "/data/jazzy/miniconda2/lib/python2.7/site-packages/six.py", line 662, in <module>
iterbytes = functools.partial(itertools.imap, ord)
AttributeError: 'module' object has no attribute 'partial'
我还尝试了导入functools,itertools并按以下方式在python中运行,并且该语句已正确执行
import itertools
functools.partial(itertools.imap, ord)
<functools.partial object at 0x7f94f5b49e10>