-
Notifications
You must be signed in to change notification settings - Fork 543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pip import results in python3 incompatible libraries #220
Comments
There's a few open PRs about this issue, with varying solutions:
There's also rules_pip, which offers a |
Thanks @aaliddell! I was unaware of rules_pip and will definitely take a look. I'll keep following. |
also check this https://github.com/ali5h/rules_pip_lock |
Python 2 will be officially past EOL come 2020: https://pythonclock.org/ |
This should be resolved imminently. Dedupping this issue to #249. |
pip_import
is using 'python' hardcoded, which in many cases (urllib2, psutil and several others) results in Python 2 libraries that are not compatible with Python 3.I replaced "python" with "python3" in the following line and everything works perfectly on my environment.
rules_python/python/pip.bzl
Line 27 in 4b84ad2
Since this is blocking my team, I created a local copy of
pip.bzl
and patched it just for now. I'm not sure what is the appropriate way to approach this. If there is a way to get the PY/3 interpreter path from Bazel, a fair solution can be to add apython_version
parameter to the import rule.Seems like an essential feature for Python 3 support and I will be happy to contribute a PR if we can decide on a solution. WDYT?
The text was updated successfully, but these errors were encountered: