TypeError: type 'List' is not subscriptable when running python3 -m IPython on Python 3.11 · Issue #14903 · ipython/ipython · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
...
TypeError: type 'List' is not subscriptable
Python version: 3.11.3
OS: macOS
Steps to reproduce
Clone the repo
Follow the development install instructions
Run python3 -m IPython
Additional info
This blocks running IPython from source. Please advise if there's a workaround or if the docs need updating.
Output of python -c "import IPython; print(IPython.sys_info())":
Traceback (most recent call last):
File "<frozen runpy>", line 189, in _run_module_as_main
...
File "/path/to/ipython/IPython/core/interactiveshell.py", line 338, in InteractiveShell
ast_transformers: List[ast.NodeTransformer] = List(
~~~~^^^^^^^^^^^^^^^^^^^^^
TypeError: type 'List' is not subscriptable
The text was updated successfully, but these errors were encountered:
To help future contributors avoid this installation pitfall, I plan to submit a PR improving the documentation. Specifically, I’ll update the installation instructions to recommend:
Before running python3 -m IPython or, when installing from source, pip install -e ., users should create and activate a Python virtual environment.
@krassowski Thank you for the insight! That makes sense—having an outdated version of traitlets in the global environment could definitely cause issues.
Would you agree that this highlights the importance of activating a fresh virtual environment before installing IPython from source? It seems to help ensure all dependencies are up to date and avoid conflicts with system packages.
I’ll incorporate this recommendation into my upcoming documentation PR.
Problem
When running
python3 -m IPython
after following the development setup instructions, I get the following error:Steps to reproduce
python3 -m IPython
Additional info
This blocks running IPython from source. Please advise if there's a workaround or if the docs need updating.
Output of
python -c "import IPython; print(IPython.sys_info())"
:The text was updated successfully, but these errors were encountered: