Missing dependency when installing iPython on Python 2.7
See original GitHub issueThanks for this project, I encountered the following missing enum
dependency when installing iPython on Python 2.7.
Here’s how I reproduced against poetry 0.10.0
.
[tool.poetry]
name = "test"
version = "0.10.0"
description = ""
authors = []
[tool.poetry.dependencies]
python = "2.7"
ipython = "=5.6.0"
And once poetry install
is done I tried both poetry run ipython
and ipython
without success.
Traceback (most recent call last):
File "/home/simon/.virtualenvs/tmp-33607c6fbabd8b9/bin/ipython", line 7, in <module>
from IPython import start_ipython
File "/home/simon/.virtualenvs/tmp-33607c6fbabd8b9/local/lib/python2.7/site-packages/IPython/__init__.py", line 48, in <module>
from .core.application import Application
File "/home/simon/.virtualenvs/tmp-33607c6fbabd8b9/local/lib/python2.7/site-packages/IPython/core/application.py", line 23, in <module>
from traitlets.config.application import Application, catch_config_error
File "/home/simon/.virtualenvs/tmp-33607c6fbabd8b9/local/lib/python2.7/site-packages/traitlets/__init__.py", line 1, in <module>
from .traitlets import *
File "/home/simon/.virtualenvs/tmp-33607c6fbabd8b9/local/lib/python2.7/site-packages/traitlets/traitlets.py", line 49, in <module>
import enum
ImportError: No module named enum
I assume this is caused by traitlets
’s usage of extra_requires
for Python 2.
https://github.com/ipython/traitlets/blob/ee1a829fafad654601dc851dc1d4ec79da090913/setup.py#L92
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (8 by maintainers)
Top Results From Across the Web
Missing dependency when installing iPython on Python 2.7
Thanks for this project, I encountered the following missing enum dependency when installing iPython on Python 2.7.
Read more >Installing IPython — IPython 8.7.0 documentation
Manual installation without dependencies is possible, but not recommended. The dependencies can be viewed with package manager commands, such as pip show ......
Read more >Installing IPython
This page contains simplified installation instructions that should work for most users. Our official documentation contains more detailed instructions for ...
Read more >Installing ipython with python 2.7 - Stack Overflow
Trying to install ipython on Centos 6.8. It originally had Python 2.6 and I got Python 2.7 installed. Which python returns /usr/bin/python ...
Read more >874133 – Missing Dependency (python-argparse)
Remove python-argparse 2. Try to install this version of ipython 3. Install succeeds 4. Run Ipython, complains about argparse missing.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think I know where the problem is coming from.
traitlets
definesenum34
as a dependency twice:Currently,
poetry
assumes that every dependency appear only once so in this case it picks up the last one:enum34; python_version=="3.3"
That’s why
enum34
is not installed for Python 2.7.I am not sure about the best approach here. While I think the proper way to declare the
enum34
dependency should beenum34; python_version in "2.7 3.3"
,poetry
should be able to handle this.@bertjwregeer I think #164 is the same issue so we can use it to track this