Created
December 26, 2025 01:48
-
-
Save mhucka/6c039f31559faf402aa3f629a597561a to your computer and use it in GitHub Desktop.
Script to test what gets installed by different pip commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Approach: do separate runs of this script, both with the same Ubuntu image | |
| # name as the first argument and one of the following strings as the second | |
| # (where WHEELFILE is the appropriate one for the python version in the image): | |
| # | |
| # 1) "pip install -v wheelhouse/WHEELFILE" | |
| # 2) "pip install -v tensorflow==2.16.2; pip install -v wheelhouse/WHEELFILE" | |
| docker_image="${1}" | |
| pip_commands="${2}" | |
| docker run -i --rm --network host \ | |
| -v "$(git rev-parse --show-toplevel)":/tfq \ | |
| -w /tfq \ | |
| "${docker_image}" \ | |
| /bin/bash -x <<EOF | |
| rm -rf test-install-venv | |
| python -m venv test-install-venv | |
| . test-install-venv/bin/activate | |
| which python | |
| python --version | |
| python3 -uc 'import platform as p; print(p.python_implementation())' | |
| python3 -uc 'import platform as p; print(p.python_compiler())' | |
| python -m pip install -U pip | |
| which pip | |
| pip --version | |
| pip cache purge | |
| pip list | |
| ${pip_commands} | |
| pip list | |
| pip show tensorflow | |
| pip show tensorflow-quantum | |
| EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment