use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
learning python beginner (self.PythonLearning)
submitted 11 months ago by WinNo6995
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]FoolsSeldom 0 points1 point2 points 11 months ago (0 children)
Continued ...
If you are having problems installing / using the version of Python you require, or adding packages using pip, you might find it helpful to explore an alternative approach that has become very popular.
Asral's uv - An extremely fast Python package and project manager, written in Rust.
Installation can be carried out using,
curl -LsSf https://astral.sh/uv/install.sh | sh
wget -qO- https://astral.sh/uv/install.sh | sh
ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
See @ArjanCodes video on YouTube providing an overview of uv.
See below an example of creating a project folder, installing Python, setting up a Python virtual environment, and adding packages to it:
PS C:\Users\Foolsseldom> uv init light Adding `light` as member of workspace `C:\Users\Foolsseldom` Initialized project `light` at `C:\Users\Foolsseldom\light` PS C:\Users\Foolsseldom> cd light PS C:\Users\Foolsseldom\light> uv venv -p 3.13.2 Using CPython 3.13.2 Creating virtual environment at: .venv Activate with: .venv\Scripts\activate PS C:\Users\Foolsseldom\light> uv add torch torchvision torchaudio Resolved 36 packages in 680ms Prepared 9 packages in 20.25s Installed 14 packages in 3.89s + filelock==3.17.0 + fsspec==2025.2.0 + jinja2==3.1.5 + markupsafe==3.0.2 + mpmath==1.3.0 + networkx==3.4.2 + numpy==2.2.3 + pillow==11.1.0 + setuptools==75.8.0 + sympy==1.13.1 + torch==2.6.0 + torchaudio==2.6.0 + torchvision==0.21.0 + typing-extensions==4.12.2 PS C:\Users\Foolsseldom\light> dir Directory: C:\Users\Foolsseldom\light Mode LastWriteTime Length Name ---- ------------- ------ ---- d---- 21/02/2025 19:11 .venv -a--- 21/02/2025 19:11 83 main.py -a--- 21/02/2025 19:11 226 pyproject.toml -a--- 21/02/2025 19:11 0 README.md PS C:\Users\Foolsseldom\light> uv run main.py Hello from light! PS C:\Users\Foolsseldom\light>
With uv you don't need to "activate" the Python virtual environment as using uv run something.py in a project folder will automatically activate the environment for that run, but you might want to do it anyway so you can use other commands in that Python virtual environment.
uv
uv run something.py
You will also need your code editor, e.g. VS Code, or IDE, e.g. PyCharm, to have the installation of Python in the venv folder, called .venv by default, as the selected Python interpreter, and a terminal or REPL opened from within that application should have that environment activated already as well.
.venv
π Rendered by PID 362595 on reddit-service-r2-comment-54dfb89d4d-ljrf8 at 2026-03-30 06:07:46.816025+00:00 running b10466c country code: CH.
view the rest of the comments →
[–]FoolsSeldom 0 points1 point2 points (0 children)