| PolarSPARC |
Python uv Tool
| Bhaskar S | 09/27/2025 |
Overview
The Python pip is a command-line utility used to install, upgrade, and manage Python packages and their dependencies. The uv command is a modern, high-performance Python package manager, which is a drop-in replacement for the pip command. In addition, the uv command enables one to easily create and manage the Python virtual environments.
Hands-on uv
To install the uv command, execute the following command:
$ curl -LsSf https://astral.sh/uv/install.sh | sh
The uv command will be installed in the directory $HOME/.local.
To ensure that the uv command is accessible, execute the following command:
$ . $HOME/.local/bin/env
To check the version of the installed uv command, execute the following command:
$ uv --version
The following could be the typical output:
uv 0.7.14
To update the version of the installed uv command to the latest, execute the following command:
$ uv self update
The following would be the typical output:
info: Checking for updates... success: Upgraded uv from v0.7.14 to v0.8.22! https://github.com/astral-sh/uv/releases/tag/0.8.22
To create a virtual environment called PyVenv3 in the directory /tmp/PyVenv3 , execute the following command:
$ uv venv /tmp/PyVenv3
The following would be the typical output:
Using CPython 3.12.3 interpreter at: /usr/bin/python3 Creating virtual environment at: /tmp/PyVenv3 Activate with: source /tmp/PyVenv3/bin/activate
To activate the just created virtual environment PyVenv3, execute the following command:
$ source /tmp/PyVenv3/bin/activate
The following would be the typical output:
(PyVenv3) polarsparc@polarsparc:~$
To install the Python package httpie, execute the following command:
$ uv pip install httpie
The following would be the typical output:
Using Python 3.12.3 environment at: /tmp/PyVenv3
Resolved 16 packages in 248ms
Prepared 16 packages in 141ms
|||||||||| [0/16] Installing wheels...
warning: Failed to hardlink files; falling back to full copy. This may lead to degraded performance.
If the cache and target directories are on different filesystems, hardlinking may not be supported.
If this is intentional, set `export UV_LINK_MODE=copy` or use `--link-mode=copy` to suppress this warning.
Installed 16 packages in 25ms
+ certifi==2025.8.3
+ charset-normalizer==3.4.3
+ defusedxml==0.7.1
+ httpie==3.2.4
+ idna==3.10
+ markdown-it-py==4.0.0
+ mdurl==0.1.2
+ multidict==6.6.4
+ pip==25.2
+ pygments==2.19.2
+ pysocks==1.7.1
+ requests==2.32.5
+ requests-toolbelt==1.0.0
+ rich==14.1.0
+ setuptools==80.9.0
+ urllib3==2.5.0
To verify the Python package httpie was installed, execute the following command:
$ https GET httpie.io/hello
The following would be the typical output:
HTTP/1.1 200 OK
Age: 0
CF-RAY: 985dcb2508fa43ff-EWR
Cache-Control: public, max-age=0, must-revalidate
Connection: keep-alive
Content-Encoding: gzip
Content-Type: application/json; charset=utf-8
Date: Sat, 27 Sep 2025 20:36:29 GMT
Nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
Report-To: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=FFil%2FK7S%2Bsj5FUku2CW3H8Cq61HrUnsq5C2DcK9qob1zSyXDBWSk%2BGdszgQWzOQ6u2NO6G4t3oJH1nsheFw8yv4fzX3t%2Br4mpg%3D%3D"}]}
Server: cloudflare
Transfer-Encoding: chunked
alt-svc: h3=":443"; ma=86400
cf-cache-status: DYNAMIC
etag: W/"fcegchauwd78"
strict-transport-security: max-age=63072000
x-matched-path: /api/hello
x-vercel-cache: MISS
x-vercel-id: iad1::iad1::4lhtx-1759005389617-ea46995a2815
{
"ahoy": [
"Hello, World! ? Thank you for trying out HTTPie ?",
"We hope this will become a friendship."
],
"links": {
"discord": "https://httpie.io/discord",
"github": "https://github.com/httpie",
"homepage": "https://httpie.io",
"twitter": "https://twitter.com/httpie"
}
}
To list all the Python packages installed by uv, execute the following command:
$ uv pip list
The following would be the typical output:
Using Python 3.12.3 environment at: /tmp/PyVenv3 Package Version ------------------ -------- certifi 2025.8.3 charset-normalizer 3.4.3 defusedxml 0.7.1 httpie 3.2.4 idna 3.10 markdown-it-py 4.0.0 mdurl 0.1.2 multidict 6.6.4 pip 25.2 pygments 2.19.2 pysocks 1.7.1 requests 2.32.5 requests-toolbelt 1.0.0 rich 14.1.0 setuptools 80.9.0 urllib3 2.5.0
To uninstall the Python package httpie, execute the following command:
$ uv pip uninstall httpie
The following would be the typical output:
Using Python 3.12.3 environment at: /tmp/PyVenv3 Uninstalled 1 package in 9ms - httpie==3.2.4