davidbrochart / nbterm

Jupyter Notebooks in the terminal.
MIT License
745 stars 37 forks source link

NameError: name 'implementation_name' is not defined #43

Open ShixiangWang opened 3 years ago

ShixiangWang commented 3 years ago

I install this tool from github but it doesn't work.

[wsx@VM-0-5-centos test]$ nbterm
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/setuptools-19.6-py3.6.egg/pkg_resources/__init__.py", line 2852, in _dep_map
  File "/usr/local/lib/python3.6/site-packages/setuptools-19.6-py3.6.egg/pkg_resources/__init__.py", line 2686, in __getattr__
AttributeError: _DistInfoDistribution__dep_map

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/wsx/.local/bin/nbterm", line 5, in <module>
    from pkg_resources import load_entry_point
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
  File "/usr/local/lib/python3.6/site-packages/setuptools-19.6-py3.6.egg/pkg_resources/__init__.py", line 3131, in <module>
  File "/usr/local/lib/python3.6/site-packages/setuptools-19.6-py3.6.egg/pkg_resources/__init__.py", line 3117, in _call_aside
  File "/usr/local/lib/python3.6/site-packages/setuptools-19.6-py3.6.egg/pkg_resources/__init__.py", line 3144, in _initialize_master_working_set
  File "/usr/local/lib/python3.6/site-packages/setuptools-19.6-py3.6.egg/pkg_resources/__init__.py", line 643, in _build_master
  File "/usr/local/lib/python3.6/site-packages/setuptools-19.6-py3.6.egg/pkg_resources/__init__.py", line 944, in require
  File "/usr/local/lib/python3.6/site-packages/setuptools-19.6-py3.6.egg/pkg_resources/__init__.py", line 839, in resolve
  File "/usr/local/lib/python3.6/site-packages/setuptools-19.6-py3.6.egg/pkg_resources/__init__.py", line 2630, in requires
  File "/usr/local/lib/python3.6/site-packages/setuptools-19.6-py3.6.egg/pkg_resources/__init__.py", line 2854, in _dep_map
  File "/usr/local/lib/python3.6/site-packages/setuptools-19.6-py3.6.egg/pkg_resources/__init__.py", line 2887, in _compute_dependencies
  File "/usr/local/lib/python3.6/site-packages/setuptools-19.6-py3.6.egg/pkg_resources/__init__.py", line 2884, in reqs_for_extra
  File "/usr/local/lib/python3.6/site-packages/setuptools-19.6-py3.6.egg/_markerlib/markers.py", line 113, in marker_fn
  File "<environment marker>", line 1, in <module>
NameError: name 'implementation_name' is not defined
[wsx@VM-0-5-centos test]$ pip3 list | grep kernel
ipykernel           5.5.3
kernel-driver       0.0.6
davidbrochart commented 3 years ago

Can you post the output of pip freeze?

ShixiangWang commented 3 years ago
[wsx@VM-0-5-centos d2ltrain]$ pip3 freeze
argon2-cffi==20.1.0
async-generator==1.10
attrs==20.3.0
backcall==0.2.0
bleach==3.3.0
certifi==2020.12.5
cffi==1.14.4
chardet==4.0.0
click==7.1.2
colorama==0.4.4
commonmark==0.9.1
cycler==0.10.0
d2l==0.16.3
dataclasses==0.8
decorator==5.0.7
defusedxml==0.7.1
entrypoints==0.3
idna==2.10
importlib-metadata==4.0.1
ipykernel==5.5.3
ipython==7.16.1
ipython-genutils==0.2.0
ipywidgets==7.6.3
jedi==0.18.0
Jinja2==2.11.3
jsonschema==3.2.0
jupyter==1.0.0
jupyter-client==6.2.0
jupyter-console==6.4.0
jupyter-core==4.7.1
jupyterlab-pygments==0.1.2
jupyterlab-widgets==1.0.0
kernel-driver==0.0.6
kiwisolver==1.3.1
lineedit==0.1.5
MarkupSafe==1.1.1
matplotlib==3.3.4
mistune==0.8.4
nbclient==0.5.3
nbconvert==6.0.7
nbformat==5.1.3
nbterm==0.0.11
nest-asyncio==1.5.1
notebook==6.3.0
numpy==1.19.5
packaging==20.9
pandas==1.1.5
pandocfilters==1.4.3
parso==0.8.2
pexpect==4.8.0
pickleshare==0.7.5
Pillow==8.2.0
prometheus-client==0.10.1
prompt-toolkit==3.0.18
ptyprocess==0.7.0
pycparser==2.20
Pygments==2.7.2
pyparsing==2.4.7
pyrsistent==0.17.3
python-dateutil==2.8.1
pytz==2021.1
pyzmq==22.0.3
qtconsole==5.0.3
QtPy==1.9.0
radian==0.5.9
rchitect==0.3.29
requests==2.25.1
rich==10.2.2
Send2Trash==1.5.0
six==1.15.0
terminado==0.9.4
testpath==0.4.4
torch==1.8.1
torchvision==0.9.1
tornado==6.1
traitlets==4.3.3
typer==0.3.2
typing-extensions==3.7.4.3
urllib3==1.26.4
wcwidth==0.2.5
webencodings==0.5.1
widgetsnbextension==3.5.1
zipp==3.4.1
davidbrochart commented 3 years ago
ERROR: Could not find a version that satisfies the requirement dataclasses==0.8 (from versions: 0.1, 0.2, 0.3, 0.4, 0.5, 0.6)
ERROR: No matching distribution found for dataclasses==0.8
ShixiangWang commented 3 years ago

What does this mean? I install the nbterm by pip3 install git+https://github.com/davidbrochart/nbterm, the requirements should be properly solved.

davidbrochart commented 3 years ago

In order to see what's going on, I need to reproduce your issue, but I cannot recreate your environment because of the error message above (with the requirements you provided).

ShixiangWang commented 3 years ago

Please try pip3 install git+https://github.com/ericvsmith/dataclasses. I just found it by google.

davidbrochart commented 3 years ago

dataclasses requires python=3.6, but kernel_driver requires python>=3.7.

ERROR: Could not find a version that satisfies the requirement kernel-driver==0.0.6 (from versions: 0.0.1)
ERROR: No matching distribution found for kernel-driver==0.0.6
ShixiangWang commented 3 years ago

Strange. I installed them both.