馃悶 Problem
In the contributor guide here, the flit command (flit install --symlink) doesn't work on my machine and get a strange error.
Traceback
Extras to install for deps 'all': {'jupyter', '.none', 'cesium', 'dev'} I-flit.install
Installing requirements I-flit.install
Ignoring cached-property: markers 'python_version < "3.8"' don't match your environment
Ignoring numba: markers 'python_version >= "3.9"' don't match your environment
ERROR: Double requirement given: ipywidgets>=7.0 (from -r /tmp/tmpagk2oy8crequirements.txt (line 20)) (already in ipywidgets>=7.6 (from -r /tmp/tmpagk2oy8crequirements.txt (line 2)), name='ipywidgets')
Traceback (most recent call last):
File "/home/yash/poliastro/poli/bin/flit", line 8, in <module>
sys.exit(main())
File "/home/yash/poliastro/poli/lib/python3.8/site-packages/flit/__init__.py", line 170, in main
Installer.from_ini_path(args.ini_file, user=args.user, python=python,
File "/home/yash/poliastro/poli/lib/python3.8/site-packages/flit/install.py", line 413, in install
self.install_directly()
File "/home/yash/poliastro/poli/lib/python3.8/site-packages/flit/install.py", line 298, in install_directly
self.install_requirements()
File "/home/yash/poliastro/poli/lib/python3.8/site-packages/flit/install.py", line 252, in install_requirements
check_call(cmd)
File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/yash/poliastro/poli/bin/python3', '-m', 'pip', 'install', '-r', '/tmp/tmpagk2oy8crequirements.txt']' returned non-zero exit status 1.
馃枼 Output of pip freeze
alabaster==0.7.12
anyio==3.1.0
appdirs==1.4.4
argon2-cffi==20.1.0
astroid==2.5.8
astropy==4.2.1
astroquery==0.4.2
async-generator==1.10
attrs==21.2.0
Babel==2.9.1
backcall==0.2.0
beautifulsoup4==4.9.3
black==21.5b0
bleach==3.3.0
certifi==2021.5.30
cffi==1.14.5
chardet==4.0.0
click==8.0.1
coverage==5.5
cryptography==3.4.7
cycler==0.10.0
czml3==0.5.4
decorator==5.0.9
defusedxml==0.7.1
docutils==0.17.1
entrypoints==0.3
filelock==3.0.12
flit==3.2.0
flit-core==3.2.0
html5lib==1.1
hypothesis==6.14.0
idna==2.10
imagesize==1.2.0
importlib-metadata==4.5.0
iniconfig==1.1.1
ipykernel==5.5.5
ipython==7.24.1
ipython-genutils==0.2.0
ipywidgets==7.6.3
isort==5.8.0
jedi==0.18.0
jeepney==0.6.0
Jinja2==3.0.1
jplephem==2.15
json5==0.9.5
jsonschema==3.2.0
jupyter-client==6.1.12
jupyter-core==4.7.1
jupyter-server==1.8.0
jupyterlab==3.0.16
jupyterlab-pygments==0.1.2
jupyterlab-server==2.6.0
jupyterlab-widgets==1.0.0
jupytext==1.11.3
keyring==23.0.1
kiwisolver==1.3.1
lazy-object-proxy==1.6.0
llvmlite==0.36.0
markdown-it-py==1.1.0
MarkupSafe==2.0.1
matplotlib==3.4.2
matplotlib-inline==0.1.2
mdit-py-plugins==0.2.8
mimeparse==0.1.3
mistune==0.8.4
mypy==0.901
mypy-extensions==0.4.3
myst-parser==0.14.0
nbclassic==0.3.1
nbclient==0.5.3
nbconvert==6.0.7
nbformat==5.1.3
nbsphinx==0.8.6
nest-asyncio==1.5.1
notebook==6.4.0
numba==0.53.1
numpy==1.20.3
packaging==20.9
pandas==1.2.4
pandocfilters==1.4.3
parso==0.8.2
pathspec==0.8.1
pexpect==4.8.0
pickleshare==0.7.5
Pillow==8.2.0
plotly==4.14.3
pluggy==0.13.1
poliastro==0.16.dev0
prometheus-client==0.11.0
prompt-toolkit==3.0.18
ptyprocess==0.7.0
py==1.10.0
pycodestyle==2.7.0
pycparser==2.20
pyerfa==2.0.0
Pygments==2.9.0
pyparsing==2.4.7
pyrsistent==0.17.3
pytest==6.2.2
pytest-cov==2.5.1
pytest-doctestplus==0.9.0
pytest-mpl==0.12
pytest-mypy==0.8.0
pytest-remotedata==0.3.2
python-dateutil==2.8.1
pytoml==0.1.21
pytz==2021.1
pyvo==1.1
PyYAML==5.4.1
pyzmq==22.1.0
regex==2021.4.4
requests==2.25.1
retrying==1.3.3
scipy==1.6.3
SecretStorage==3.3.1
Send2Trash==1.5.0
six==1.16.0
sniffio==1.2.0
snowballstemmer==2.1.0
sortedcontainers==2.4.0
soupsieve==2.2.1
Sphinx==3.4.3
sphinx-autoapi==1.8.1
sphinx-gallery==0.9.0
sphinx-hoverxref==0.6b1
sphinx-notfound-page==0.7.1
sphinx-rtd-theme==0.5.2
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
terminado==0.10.0
testpath==0.5.0
toml==0.10.2
tornado==6.1
traitlets==5.0.5
typing-extensions==3.10.0.0
Unidecode==1.2.0
urllib3==1.26.5
w3lib==1.22.0
wcwidth==0.2.5
webencodings==0.5.1
websocket-client==1.1.0
widgetsnbextension==3.5.1
wrapt==1.12.1
zipp==3.4.1
# Paste your output here:
馃挕 Possible solutions
pyproject.toml has ipywidgets versions mentioned twice in the same file. I am not sure if this causes a problem but removing any one of them solves the error.ERROR: Double requirement given: ipywidgets>=7.0 (from -r /tmp/tmpagk2oy8crequirements.txt (line 20)) (already in ipywidgets>=7.6 (from -r /tmp/tmpagk2oy8crequirements.txt (line 2)), name='ipywidgets')
flit install --symlink --deps=develop also fixes the error without changing pyproject.toml.So something similar might be needed? I am not sure if this is really an issue for its just on my machine so just wanted to report it here.
Thanks!
I can reproduce locally, this is a bug.
I see that we are giving inconsistent versions for ipywidgets. This fixes the issue:
$ git diff
diff --git a/pyproject.toml b/pyproject.toml
index 06875342..4e6cd073 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -72,7 +72,7 @@ dev = [
"coverage",
"hypothesis",
"ipython>=5.0",
- "ipywidgets>=7.0",
+ "ipywidgets>=7.6",
"isort",
"jupyter-client",
"jupytext",
marking it as easy :) Any newcomer, please go ahead and make a pull request directly, no need to ask for permission.
Hello! I can volunteer for this. Will send a PR in just a few hours.
Most helpful comment
Hello! I can volunteer for this. Will send a PR in just a few hours.