Skip to content

Instantly share code, notes, and snippets.

@robertlagrant
Created July 19, 2022 09:47
Show Gist options
  • Save robertlagrant/23489d8970ef6b4996030785f1e3ee58 to your computer and use it in GitHub Desktop.
Save robertlagrant/23489d8970ef6b4996030785f1e3ee58 to your computer and use it in GitHub Desktop.
Check pip upgrades packages for https://news.ycombinator.com/item?id=32149162
% mkdir try_pip
% cd try_pip
% ls
% python3 -m venv venv
% source venv/bin/activate
(venv) % pip install flask==0.12.5
Collecting flask==0.12.5
Using cached Flask-0.12.5-py2.py3-none-any.whl (81 kB)
Collecting itsdangerous>=0.21
Downloading itsdangerous-2.1.2-py3-none-any.whl (15 kB)
Collecting Jinja2>=2.4
Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
Collecting Werkzeug<1.0,>=0.7
Using cached Werkzeug-0.16.1-py2.py3-none-any.whl (327 kB)
Collecting click>=2.0
Using cached click-8.1.3-py3-none-any.whl (96 kB)
Collecting MarkupSafe>=2.0
Downloading MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_universal2.whl (17 kB)
Installing collected packages: Werkzeug, MarkupSafe, itsdangerous, click, Jinja2, flask
Successfully installed Jinja2-3.1.2 MarkupSafe-2.1.1 Werkzeug-0.16.1 click-8.1.3 flask-0.12.5 itsdangerous-2.1.2
(venv) %
(venv) % pip freeze > requirements.txt
(venv) % cat requirements.txt
click==8.1.3
Flask==0.12.5
itsdangerous==2.1.2
Jinja2==3.1.2
MarkupSafe==2.1.1
Werkzeug==0.16.1
(venv) %
(venv) % pip install --upgrade flask
Requirement already satisfied: flask in ./venv/lib/python3.10/site-packages (0.12.5)
Collecting flask
Downloading Flask-2.1.3-py3-none-any.whl (95 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 95.6/95.6 KB 1.6 MB/s eta 0:00:00
Requirement already satisfied: click>=8.0 in ./venv/lib/python3.10/site-packages (from flask) (8.1.3)
Collecting Werkzeug>=2.0
Downloading Werkzeug-2.1.2-py3-none-any.whl (224 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 224.9/224.9 KB 4.4 MB/s eta 0:00:00
Requirement already satisfied: Jinja2>=3.0 in ./venv/lib/python3.10/site-packages (from flask) (3.1.2)
Requirement already satisfied: itsdangerous>=2.0 in ./venv/lib/python3.10/site-packages (from flask) (2.1.2)
Requirement already satisfied: MarkupSafe>=2.0 in ./venv/lib/python3.10/site-packages (from Jinja2>=3.0->flask) (2.1.1)
Installing collected packages: Werkzeug, flask
Attempting uninstall: Werkzeug
Found existing installation: Werkzeug 0.16.1
Uninstalling Werkzeug-0.16.1:
Successfully uninstalled Werkzeug-0.16.1
Attempting uninstall: flask
Found existing installation: Flask 0.12.5
Uninstalling Flask-0.12.5:
Successfully uninstalled Flask-0.12.5
Successfully installed Werkzeug-2.1.2 flask-2.1.3
(venv) % pip freeze > new_requirements.txt
(venv) % diff requirements.txt new_requirements.txt
2c2
< Flask==0.12.5
---
> Flask==2.1.3
6c6
< Werkzeug==0.16.1
---
> Werkzeug==2.1.2
(venv) %
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment