ImportError: cannot import name 'default'

1,080 views
Skip to first unread message

Arvind Kandaswamy

unread,
Mar 31, 2017, 8:37:52 PM3/31/17
to Project Jupyter

When trying to start Jupyter with the command Jupyter Notebook, I am getting this below error:

File "/anaconda/bin/jupyter-notebook", line 4, in <module>
import notebook.notebookapp
File "/anaconda/lib/python3.6/site-packages/notebook/notebookapp.py", 
line 63, in <module>
from .services.contents.manager import ContentsManager
File "/anaconda/lib/python3.6/site-
packages/notebook/services/contents/manager.py", line 16, in <module>
from nbformat import sign, validate, ValidationError
File "/anaconda/lib/python3.6/site-packages/nbformat/sign.py", line 24, 
in <module>
from traitlets import (
ImportError: cannot import name 'default'


Any idea what is missing? 



Paul Hobson

unread,
Apr 1, 2017, 10:09:20 AM4/1/17
to jup...@googlegroups.com
How exactly did you install jupyter notebook?

what are the output of "conda list", "conda info -e", and "which python"?

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/a566d1c7-237a-4762-ac3d-6931867ba951%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Arvind Kandaswamy

unread,
Apr 1, 2017, 10:17:02 AM4/1/17
to jup...@googlegroups.com
I installed jupyter notebook as part of anaconda.  After running into issues, I uninstalled jupyter and reinstalled. Still the same issue. Here is the output:



# packages in environment at /anaconda:
#
_license                  1.1                      py36_1  
alabaster                 0.7.9                    py36_0  
anaconda                  custom                   py36_0  
anaconda-clean            1.1.0                    py36_0  
anaconda-client           1.6.0                    py36_0  
anaconda-navigator        1.5.1                    py36_0  
anaconda-project          0.4.1                    py36_0  
appnope                   0.1.0                    py36_0  
appscript                 1.0.1                    py36_0  
astroid                   1.4.9                    py36_0  
astropy                   1.3                 np111py36_0  
awscli                    1.11.68                   <pip>
babel                     2.3.4                    py36_0  
backports                 1.0                      py36_0  
beautifulsoup4            4.5.3                    py36_0  
bitarray                  0.8.1                    py36_0  
blaze                     0.10.1                   py36_0  
bokeh                     0.12.4                   py36_0  
boto                      2.45.0                   py36_0  
boto                      2.46.1                    <pip>
boto3                     1.4.4                     <pip>
botocore                  1.5.31                    <pip>
bottleneck                1.2.0               np111py36_0  
bz2file                   0.98                      <pip>
cffi                      1.9.1                    py36_0  
chardet                   2.3.0                    py36_0  
chest                     0.2.3                    py36_0  
click                     6.7                      py36_0  
cloudpickle               0.2.2                    py36_0  
clyent                    1.2.2                    py36_0  
colorama                  0.3.7                    py36_0  
conda                     4.3.15                   py36_0  
conda-env                 2.6.0                         0  
configobj                 5.0.6                    py36_0  
contextlib2               0.5.4                    py36_0  
cryptography              1.7.1                    py36_0  
curl                      7.52.1                        0  
cycler                    0.10.0                   py36_0  
cython                    0.25.2                   py36_0  
cytoolz                   0.8.2                    py36_0  
dask                      0.13.0                   py36_0  
datashape                 0.5.4                    py36_0  
decorator                 4.0.11                   py36_0  
decorator                 4.0.2                     <pip>
dill                      0.2.5                    py36_0  
docutils                  0.13.1                   py36_0  
docutils                  0.12                      <pip>
entrypoints               0.2.2                    py36_0  
et_xmlfile                1.0.1                    py36_0  
fastcache                 1.0.2                    py36_1  
flask                     0.12                     py36_0  
flask-cors                3.0.2                    py36_0  
freetype                  2.5.5                         2  
get_terminal_size         1.0.0                    py36_0  
gevent                    1.2.1                    py36_0  
gnureadline               6.3.3                     <pip>
greenlet                  0.4.11                   py36_0  
h5py                      2.6.0               np111py36_2  
hdf5                      1.8.17                        1  
heapdict                  1.0.0                    py36_1  
icu                       54.1                          0  
idna                      2.2                      py36_0  
imagesize                 0.7.1                    py36_0  
ipykernel                 4.5.2                    py36_0  
ipython                   4.0.0                     <pip>
ipython                   5.1.0                    py36_1  
ipython_genutils          0.1.0                    py36_0  
ipywidgets                5.2.2                    py36_1  
isort                     4.2.5                    py36_0  
itsdangerous              0.24                     py36_0  
jbig                      2.1                           0  
jdcal                     1.3                      py36_0  
jedi                      0.9.0                    py36_1  
jfx-util-api              0.0.2                     <pip>
jfx-util-aws              0.0.2                     <pip>
jfx-util-logging          0.0.1                     <pip>
jfx-util-okta             0.0.1                     <pip>
jfx-util-spark            0.0.1                     <pip>
jinja2                    2.9.4                    py36_0  
jmespath                  0.8.0                     <pip>
jpeg                      9b                            0  
jsonschema                2.5.1                    py36_0  
jupyter                   1.0.0                    py36_3  
jupyter_client            4.4.0                    py36_0  
jupyter_console           5.0.0                    py36_0  
jupyter_core              4.2.1                    py36_0  
lazy-object-proxy         1.2.2                    py36_0  
libiconv                  1.14                          0  
libpng                    1.6.27                        0  
libtiff                   4.0.6                         3  
libxml2                   2.9.4                         0  
libxslt                   1.1.29                        0  
llvmlite                  0.15.0                   py36_0  
locket                    0.2.0                    py36_1  
lxml                      3.7.2                    py36_0  
markupsafe                0.23                     py36_2  
matplotlib                2.0.0               np111py36_0  
mistune                   0.7.3                    py36_1  
mkl                       2017.0.1                      0  
mkl-service               1.1.2                    py36_3  
mpmath                    0.19                     py36_1  
multipledispatch          0.4.9                    py36_0  
nbconvert                 4.2.0                    py36_0  
nbformat                  4.2.0                    py36_0  
networkx                  1.11                     py36_0  
nltk                      3.2.2                    py36_0  
nose                      1.3.7                    py36_1  
notebook                  4.3.1                    py36_0  
numba                     0.30.1              np111py36_0  
numexpr                   2.6.1               np111py36_2  
numpy                     1.11.3                   py36_0  
numpydoc                  0.6.0                    py36_0  
odo                       0.5.0                    py36_1  
openpyxl                  2.4.1                    py36_0  
openssl                   1.0.2k                        1  
pandas                    0.19.2              np111py36_1  
partd                     0.3.7                    py36_0  
path.py                   8.1.1                     <pip>
path.py                   10.0                     py36_0  
pathlib2                  2.2.0                    py36_0  
patsy                     0.4.1                    py36_0  
pep8                      1.7.0                    py36_0  
pexpect                   3.3                       <pip>
pexpect                   4.2.1                    py36_0  
pickleshare               0.5                       <pip>
pickleshare               0.7.4                    py36_0  
pillow                    4.0.0                    py36_0  
pip                       9.0.1                    py36_1  
ply                       3.9                      py36_0  
prompt_toolkit            1.0.9                    py36_0  
psutil                    5.0.1                    py36_0  
psycopg2                  2.7.1                     <pip>
ptyprocess                0.5.1                    py36_0  
py                        1.4.32                   py36_0  
py4j                      0.10.4                    <pip>
pyasn1                    0.1.9                    py36_0  
pycosat                   0.6.1                    py36_1  
pycparser                 2.17                     py36_0  
pycrypto                  2.6.1                    py36_4  
pycurl                    7.43.0                   py36_2  
pyflakes                  1.5.0                    py36_0  
pygments                  2.1.3                    py36_0  
pylint                    1.6.4                    py36_1  
pyopenssl                 16.2.0                   py36_0  
pyparsing                 2.1.4                    py36_0  
pyqt                      5.6.0                    py36_1  
pytables                  3.3.0               np111py36_0  
pytest                    3.0.5                    py36_0  
python                    3.6.0                         0  
python-dateutil           2.6.0                    py36_0  
python-dateutil           2.4.2                     <pip>
python.app                1.2                      py36_4  
pytz                      2016.10                  py36_0  
pyyaml                    3.12                     py36_0  
pyzmq                     16.0.2                   py36_0  
qt                        5.6.2                         0  
qtawesome                 0.4.3                    py36_0  
qtconsole                 4.2.1                    py36_1  
qtpy                      1.2.1                    py36_0  
readline                  6.2                           2  
redis                     3.2.0                         0  
redis-py                  2.10.5                   py36_0  
requests                  2.12.4                   py36_0  
requests                  2.7.0                     <pip>
rope                      0.9.4                    py36_1  
ruamel_yaml               0.11.14                  py36_1  
s3transfer                0.1.10                    <pip>
scikit-image              0.12.3              np111py36_1  
scikit-learn              0.18.1              np111py36_1  
scipy                     0.18.1              np111py36_1  
seaborn                   0.7.1                    py36_0  
setuptools                27.2.0                   py36_0  
simplegeneric             0.8.1                    py36_1  
singledispatch            3.4.0.3                  py36_0  
sip                       4.18                     py36_0  
six                       1.10.0                   py36_0  
six                       1.9.0                     <pip>
smart-open                1.5.1                     <pip>
snowballstemmer           1.2.1                    py36_0  
sockjs-tornado            1.0.3                    py36_0  
sphinx                    1.5.1                    py36_0  
spyder                    3.1.2                    py36_0  
sqlalchemy                1.1.5                    py36_0  
sqlite                    3.13.0                        0  
statsmodels               0.6.1               np111py36_1  
sympy                     1.0                      py36_0  
terminado                 0.6                      py36_0  
tk                        8.5.18                        0  
toolz                     0.8.2                    py36_0  
tornado                   4.4.2                    py36_0  
traitlets                 4.3.1                    py36_0  
traitlets                 4.3.2                     <pip>
unicodecsv                0.14.1                   py36_0  
virtualenv                15.1.0                    <pip>
wcwidth                   0.1.7                    py36_0  
werkzeug                  0.11.15                  py36_0  
wheel                     0.29.0                   py36_0  
widgetsnbextension        1.2.6                    py36_0  
wrapt                     1.10.8                   py36_0  
xlrd                      1.0.0                    py36_0  
xlsxwriter                0.9.6                    py36_0  
xlwings                   0.10.2                   py36_0  
xlwt                      1.2.0                    py36_0  
xz                        5.2.2                         1  
yaml                      0.1.6                         0  
zlib                      1.2.8                         3  

# conda environments:

#

py2                      /anaconda/envs/py2

py3                      /anaconda/envs/py3

root                  *  /anaconda


which python:

/anaconda/bin/python


--
You received this message because you are subscribed to a topic in the Google Groups "Project Jupyter" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jupyter/q0HzVOzxcyA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jupyter+unsubscribe@googlegroups.com.

To post to this group, send email to jup...@googlegroups.com.

Arvind Kandaswamy

unread,
Apr 2, 2017, 8:39:58 PM4/2/17
to jup...@googlegroups.com
In my Py3 environment, I uninstalled traitlets and reinstalled it. The problem went away. Not sure exactly how it broke in the first place.

Thanks for your help.
Reply all
Reply to author
Forward
0 new messages