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
I'm trying to invoke the pip_install workspace rule with Python2, setting python_interpreter to "python2". But pip_install fails with the error /usr/bin/python2: No module named python.pip_install. I tracked this down to missing __init__.py files in the rules_python/python and rules_python/python/pip_install directories. Python2 must require init.py files in the whole module path whereas Python3 doesn't... Anyhow, once the files are there, python2 fails with the error:
Thanks for the issue report. rules_python_external, which the new packing rules are from, was always only supporting 3.5+. Though this is not clearly communicated in the repo.
Going forward, Python 2 won't be supported by the packaging rules. Python 2 is officially sunsetted and no longer supported. Pip has dropped support for Python 2 and we want to move forward along with Pip.
The legacy rules still should work for Python 2, so we should make it much clearer that that's the only option for Python 2.
🐞 bug report
Affected Rule
The issue is caused by the rule:
pip_import
Is this a regression?
No. Yes. Maybe.
Description
I'm trying to invoke the
pip_install
workspace rule with Python2, settingpython_interpreter
to"python2"
. Butpip_install
fails with the error/usr/bin/python2: No module named python.pip_install
. I tracked this down to missing__init__.py
files in therules_python/python
andrules_python/python/pip_install
directories. Python2 must require init.py files in the whole module path whereas Python3 doesn't... Anyhow, once the files are there,python2
fails with the error:Which tells me that that's Python3 syntax. :( Is Python2 not supported for
pip_install
?🌍 Your Environment
Output of
bazel version
:Rules_python version:
python2 --version:
Python 2.7.18
The text was updated successfully, but these errors were encountered: