explosion / explosion/spaCy

vscode doesn't like displacy.render(sentence1, style="dep")

Open
#13,809 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
33.9k
Forks
4.7k
Avg merge
3m
Merged PRs (30d)
1

Description

## How to reproduce the behaviour

---------------------------------------------------------------------------
```
ImportError Traceback (most recent call last)
Cell In[44], line 2
1 from spacy import displacy
----> 2 displacy.render(sentence1, style="dep")

File c:\Users\kundeng\scoop\persist\mambaforge\envs\spacy\Lib\site-packages\spacy\displacy\__init__.py:69, in render(docs, style, page, minify, jupyter, options, manual)
65 html = RENDER_WRAPPER(html)
66 if jupyter or (jupyter is None and is_in_jupyter()):
67 # return HTML rendered by IPython display()
68 # See #4840 for details on span wrapper to disable mathjax
---> 69 from IPython.core.display import HTML, display
71 return display(HTML('{}'.format(html)))
72 return html

ImportError: cannot import name 'display' from 'IPython.core.display' (c:\Users\xxx\scoop\persist\mambaforge\envs\spacy\Lib\site-packages\IPython\core\display.py)
```
## Your Environment

* Operating System: Windows 11
* Python Version Used: python 3.12.10
* spaCy Version Used: 3.8.5
* Environment Information: Conda Mamaforge

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.