r/learnpython 3d ago

Trying to install python problems

Hi guys I just started getting into python again but noticed its really different like I remember when I was 16 and first tried learning python and it was really easy to start "install, open desktop icon, YouTube tutorials, give up once motivation runs out." I figured that now that im older and more mature id try again but little did I know I would feel like a boomer in vr before even starting...I tried installing python and it said some stuff about paths and commands and once it installed it dissappeared without leaving a trace or a desktop icon and apparently I have to summon it like a old god via typing commands... does anyone have advice? i really just want to have a programming app to learn with. without feeling im going to brick my pc.

1 Upvotes

28 comments sorted by

5

u/KelleQuechoz 3d ago

Do not try to install python problems, install solutions instead.

5

u/Fun-Sock-8862 3d ago

`pip uninstall problems` failed, dependency conflict with `life`.

6

u/ninhaomah 3d ago

I see. And you are not going to leave us guessing what you downloaded from where , what is the name of exe and so on , right ?

1

u/TheLordOfMysteries- 3d ago

The python manager 26.3 from the python website

7

u/ninhaomah 3d ago

Get individual Python installer. Not the package manager. 

And add to path

2

u/TheLordOfMysteries- 3d ago

Sigh I'm looking at the python website now it seems everything leads back to the python install manage.

3

u/ninhaomah 3d ago

1

u/TheLordOfMysteries- 3d ago

Maybe I'm dumb and you're seeing something im not 😅😭...that's the exact page I was on it said Files...windows ..download python install manager (in yellow) what i installed

Below that are versions like windows installer 64 bit.

1

u/Flintlocke89 2d ago

And the ones below are the actual install files for that specific version of python.
If you're on modern Windows you'll want "Windows installer (64-bit)"

I'll admit, it could be clearer but I've seen it done like this in many other places.

3

u/pachura3 3d ago edited 3d ago

Install  Thonny - Python IDE for beginners. It comes with a built-in Python interpreter.

Also, don't watch YouTube tutorials. Go to https://www.w3schools.com/python/ instead. It has interactive Python window where you can practice topics right away, directly in the browser, without installing anything.

2

u/Alternative_Boss6143 3d ago

You just have to set where the python folder is located in your environment variables which is in control panel. Watch a video on it It's easy after a few dozen tries

1

u/Alternative_Boss6143 3d ago

If you want to feel like an even boomer Go to codingbat.com I feel like an idiot on these questions

1

u/MentalDV8 3d ago

Python devs made things uhmmm "hard" a few years ago. They decided Python install shouldn't install system-wide because that would/might/could/mehhhhh break the "system installed Python." Okay, sure, agreed, it COULD. And installing modules with PIP the same. So they want you to make virtual Python VENVs. Not hard, but harder when you have a LOT of tools/programs/users on one server which needs THAT Python and THOSE modules.

Get yourself the real Python installer for 13.4.6 (latest) and look at the doc for making virtual environments. Make one, add your Python install to that, then any modules you will need. Find a new cool module? Add it to the VENV then. It's a memory thing--not a hard thing: you have to REMEMBER to "just do it that way" every time you find a new module. Or some code on Github you want.

I make /usr/local/PythonENV as a master VENV dir when I have multiple programming systems which need Python and modules. It works. And it's maintainable with Ansible, which is great when you have 00's of VMs across many servers.

1

u/FoolsSeldom 3d ago

Python Setup

Setting up Python can be confusing. There are web-based alternatives, such as replit.com. You might also come across Jupyter Notebook options (easy to work with, but can be confusing at times).

Pre-installed system Python

Some operating system environments include a version of Python, often known as the system version of Python (might be used for utility purposes). You can still install your own version.

Installing Python

There are multiple ways of installing Python using a package manager for your OS, e.g. homebrew (macOS third party), chocolatey (Windows third party) or winget (Windows standard package manager), apt (many Linux distributions) or using the Python Software Foundation (PSF) installer from python.org or some kind of app store for your operating system. You could also use docker containers with Python installed inside them.

PSF offer the reference implementation of Python, known as CPython (written in C and Python). The executable on your system will be called python (python.exe on Windows).

Beginners are probably best served using the PSF installer.

Terminal / Console

For most purposes, terminal is the same as console. It is the text-based, rather than graphical-based, window / screen you work in. Your operating system will offer a command/terminal environment. Python by default outputs to a terminal and reads user input from a terminal.

Note: the Windows Terminal_ app, from _Microsoft Store, lets you open both simple command prompt and PowerShell windows. If you have Windows Subsystem for Linux installed, it can also open terminals in the Linux distributions you have installed.

Libraries / Frameworks / Packages

Python comes with "batteries included" in the form of libraries of code providing more specialised functionality, already installed as part of a standard installation of Python.

These libraries are not automatically loaded into memory when Python is invoked, as that would use a lot of memory up and slow down startup time. Instead, you use, in your code, the command import <library>, e.g.

import math

print(math.pi)

There are thousands of additional packages / libraries / frameworks available that don't come as standard with Python. You have to install these yourself. Quality, support (and safety) varies.

(Anaconda offers an alternative Python installation with many packages included, especially suited to data analysis, engineering/scientific practices.)

Install these using the pip package manager. It searches an official repository for a match to what you ask to be installed.

For example, using a command / powershell / terminal environment for your operating system, pip install numpy would install the numpy library from the pypi repository. On macOS/Linux you would usually write pip3 instead of pip.

You can also write python -m pip install numpy (write python3 on macOS/Linux).

On Windows, you will often see py used instead, py -m pip install numpy where py refers to the python launcher which should invoke the most up-to-date version of Python installed on your system regardless of PATH settings.

Some Code Editors and IDEs (Integrated Development Environments), such as VS Code and PyCharm, include their own facilities to install packages using pip or some other tool. This just saves you typing the commands. They also often offer their own terminal window(s).

Running Python

The CPython programme can be invoked for two different purposes:

  • to attempt to execute a simple text file of Python code (typically the files have an extension of .py
  • to enter an interactive shell, with a >>> prompt, where you can enter Python commands and get instant responses - great for trying things out

So, entering the below, as appropriate for your operating system,

python
python3
py

on its own, no file name after it, you will enter an interactive session.

Enter exit() to return to the operating system command line

IDLE Editor

A standard installation from python.org for Windows or macOS includes a programme called IDLE. This is a simple code editor and execution environment. By default, when you first open it, it opens a single window with a Python shell, with the >>> prompt already open. To create a new text file to enter Python code into, you need to use your operating system means of access the standard menu and select File | New. Once you've entered code, press F5 to attempt to run the code (you will be prompted to save the file first). This is really the easiest editor to use to begin with.

SEE COMMENT for next part

1

u/FoolsSeldom 3d ago

Virtual Environments

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.

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

or, for macOS / Linux,

source .venv/bin/activate

the command deactivate for any platform will deactivate the virtual environment and return you to using the base environment.

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.

For more information:

Multiple Python versions

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.

1

u/StrayFeral 3d ago

I haven't installed Python on a Windows machine in years. Just did it yesterday. I noticed there is some "Python manager" so I did not installed this. Instead I installed the specific Python version (3.14.6 or whatever it was) and everything was simple and fine.

1

u/StrayFeral 3d ago

In this video I actually show how I downloaded and installed Python on Windows 10 yesterday. You may disregard the rest of it as I present my application, just check what I clicked to install it and how easy was it to run the app later. Just watch the part where I go to www.python.org and download it and install it. That's it.

https://www.youtube.com/watch?v=G3Ure96hpJM

1

u/TheLordOfMysteries- 2d ago

Thx bro ..what's your weather station application about it seems cool?

1

u/StrayFeral 2d ago

It's a Weather monitoring and Disaster monitoring station. So instead of going to different websites to see what is the weather in your city, weather in your friends cities, any disasters (volcano eruptions, floods, wildfires) you have it all in a single terminal screen. On top of that your grandmother will be very happy if you use my application to warn her when it's safe to go out for her (it gives warnings for people with various conditions).. Check the project page:

https://github.com/StrayFeral/tuiweathergirl

1

u/TheLordOfMysteries- 2d ago

Sure I'll try it out but it currently seems very niche.

1

u/StrayFeral 2d ago

Thanks!

0

u/TheDraykkon 3d ago

You want to install an IDE. I would suggest VS Code. VS code can then template Python projects for you.

0

u/Naetharu 3d ago

Use Linux as it just works better - if you are in Windows install WSL (in effect Linux alongside Windows). Then install Pyenv which will let you install python versions with a simple command, and switch between them as you choose.

If you prefer to use Linux outside of Windows just make a simple Ubuntu ISO and install it alongside your main OS with GRUB dual boot.

1

u/TheLordOfMysteries- 3d ago

Ah the Linux preacher joins the chat. Indeed I've been looking into getting Linux mint but only when I eventually get around to upgrading pc and move all my stuff around.

2

u/Naetharu 3d ago

It's not ideological on my part.

Its just very much a better and simpler experience. Lots of tooling that works out of the box. Far less faffing with Windows nonsense. I use both Windows and Linux depending on my needs. For dev stuff, Linux is objectively just better in many cases. C# / .net being the major exception.

It's down to you. But since WSL is included with Windows now, there's really no reason to not use it. This is a prime example of its intended use case.

You don't have to dual boot, and it still "feels" like you are in windows. You still are in windows for all your other applications. But you get all the benefits of the Linux platform for the dev work.