Skip to content

Document how to flush out bad pip deps with bazel clean --expunge #165

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

Closed
PeterZhizhin opened this issue Feb 17, 2019 · 0 comments · Fixed by #256
Closed

Document how to flush out bad pip deps with bazel clean --expunge #165

PeterZhizhin opened this issue Feb 17, 2019 · 0 comments · Fixed by #256
Assignees

Comments

@PeterZhizhin
Copy link

Hello. Thank you very much for your work.

I was experimenting with Bazel + PIP rules in my Python project that used Python 3.
My default interpreter was Python 2 when I first created my Bazel project with all PIP dependencies in it.
I tried running some unit-tests with Bazel and got errors about running in Python 2.

Changed test's python_version to PY3 and got errors about fetched PIP dependencies working only with Python 2, not 3. It was an error somewhere in a recursive dependency (Python 2's future library, in particular).

I tried to make rules_python to work with a different interpreter, and it didn't work. It was easier to change my default Python interpreter to Python 3.

After doing that, the dependencies were not downloaded again to work with Python 3. I tried calling bazel clean multiple times, that didn't work. It was hard for me to debug the problem. I spent several hours doing that as I didn't have a lot of experience with Bazel.

In order to make it work, I had to call bazel clean --expunge.

I wish it was documented somewhere. It would have saved me several hours of debugging. If you consider to merge one of the PRs: #85 or #158, then it will also be a problem using the functionality.

Anyway, thank you for the project. This is not really a huge problem. The issue is here to make it easier for someone else online in the future.

@brandjon brandjon changed the title Weird behaviour when changing default Python interpreter from 2 to 3 Document how to flush out bad pip deps with bazel clean --expunge Nov 12, 2019
@brandjon brandjon self-assigned this Nov 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants