https://pantsbuild.org/ logo
#general
Title
# general
g

gorgeous-addition-6562

08/25/2022, 11:02 PM
Problem with `--extra-index-url`: My
requirements.txt
is like this
Copy code
bagpy
roslz4 --extra-index-url <https://rospypi.github.io/simple/>
Using that in a venv with pip works fine for my app. But
pants
seems to not able to pick up the extra url:
Copy code
stderr:
ERROR: Could not find a version that satisfies the requirement roslz4
ERROR: No matching distribution found for roslz4
pid 1205759 -> /home/aghosh/.cache/pants/named_caches/pex_root/venvs/b16167dce033b47f1a773c13706cbea19b1a1591/ddab8011daaee380698ac2fb9701af18c90c03f6/pex --disable-pip-version-check --no-python-version-warning --exists-action a --isolated -q --cache-dir /home/aghosh/.cache/pants/named_caches/pex_root --log /tmp/process-executionqu5xHv/.tmp/pex-pip-logz29_sdf0/pip.log download --dest /tmp/process-executionqu5xHv/.tmp/tmpjrywxg8u/usr.bin.python3.8 bagpy roslz4 --index-url <https://pypi.org/simple/> --retries 5 --timeout 15 exited with 1 and STDERR:
None
How do I fix this problem? Look like
pex
has option to pick up
--extra-index-url
as well, but my guess is
pants
doesn't pass that to
pex
? More context: https://stackoverflow.com/questions/58754968/failed-to-load-python-extension-for-lz4-support-lz4-compression-will-not-be-ava
h

hundreds-father-404

08/25/2022, 11:04 PM
Hi there, you will want to set this in
pants.toml
Copy code
[python-repos]
indexes.add = ["<https://rospypi.github.io/simple/>"]
g

gorgeous-addition-6562

08/25/2022, 11:05 PM
Thanks! Will give it a try.
❤️ 1
It works! 🎉
💯 1
It was running fine for a while, but then I hit this problem. I'm using python3.7. And there'are
roslz4
wheels in the extra url https://rospypi.github.io/simple/roslz4/. Don't know why it picks that wheel in
py3rosmsgs-1.18.2-py2.py3-non-any.whl
?
Dependency hell.
py3rosmsgs
, which
bagpy
depends on, is the culprit. It's a collection of packages, which could be outdated. Removing them and using original packages from
rospypi
seems to help solve my problem.
1