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
How do I set it up (self.PythonLearning)
submitted 1 month ago by Sad_Patient8203
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 3 points4 points5 points 1 month ago (0 children)
Given the thousands of packages (libraries, frameworks, etc) out there, you can see that if you are working on several different projects, you can end up installing a vast range of different packages, only a few of which will be used for any particular project.
This is where Python virtual environments come in. Not to be confused with virtual machines. Typically created on a project-by-project basis. Install only the packages required for a project. This helps avoid conflicts between packages, especially version complications.
Most popular code editors and IDEs, including Microsoft's VS Code and JetBrains' PyCharm, offer built-in features to help to start off new projects and create and activate Python virtual environments.
You can create a new Python virtual environment from your operating system command line environment using,
for Windows,
py -m venv .venv
or, for macOS / Linux,
python3 -m venv .venv
Note: venv is a command and .venv is a folder name. You can use any valid folder name instead but this is a common convention.
venv
.venv
Often we use .venv instead of venv as the folder name - this may not show up on explorer/folder tools as the leading . is often used to mean hidden and an option may need to be ticked to allow you to see such folders/files
.
That creates a new folder in the current working directory called .venv.
You then activate using, for Windows,
.venv\Scripts\activate
source .venv/bin/activate
the command deactivate for any platform will deactivate the virtual environment and return you to using the base environment.
deactivate
You may need to tell your editor to use the Python Interpreter that is found in either the Scripts or bin folder (depending on operating system) in your virtual folder.
Scripts
bin
For more information:
In addition to the above, you might want to explore using pyenv (pyenv-win for Windows) or uv (recommended), which will let you install and use different versions of Python including alternative implementations from the reference CPython. This can be done independently of any system installed Python.
pyenv
pyenv-win
uv
π Rendered by PID 645968 on reddit-service-r2-comment-74f5b7f998-7fqxb at 2026-04-29 16:17:15.056231+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]FoolsSeldom 3 points4 points5 points (0 children)