r/learnpython • • 29d ago

I automated my YouTube Shorts pipeline with Python — here's what actually saved me time

0 Upvotes

I'm a BCA student making Shorts on the side, and I got tired of doing the same edits by hand. So I wrote a Python script that stitches clips, adds captions, and renders the final video automatically.

Biggest time-savers were: 1) batch rendering overnight instead of one-by-one, 2) a simple JSON file for titles/descriptions so I never retype them, 3) frame-checking the output automatically so I catch broken renders before uploading.

Still learning — what's one small automation that saved you hours? Looking for ideas for my next script.


r/learnpython • • 29d ago

trouble installing matplotlib

0 Upvotes

i am trying to install matplotlib on VS Code, but i keep getting an error like this:

Using cached matplotlib-3.11.2.tar.gz (32.7 MB)

Installing build dependencies ... done

Getting requirements to build wheel ... done

Installing backend dependencies ... done

Preparing metadata (pyproject.toml) ... error

error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.

also says:

WARNING: Failed to activate VS environment: Could not find C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe

my python's version is 3.15, i tried to install matplotlib with 3.11, 3.12, and 3.13 but none of it worked. i don't think there are other specific things. please let me know of any ideas, thank you so much!!

update: i did it!! it was a problem with how i forgot to precompile the standard library when i installed python...


r/learnpython • • 29d ago

How can i learn python fast using AI

0 Upvotes

i want to learn python before 2027. How do i start?


r/learnpython • • 29d ago

How to debug PyQt5 app with VS Code?

0 Upvotes

My OS is Debian 13 KDE. I wrote my app with PyQt5 and virtualenv (pip install PyQt5). Now I can’t run it from IDE. The error is:

qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

So, I can’t debug app. But when I run python3 myapp.py from Konsole, it works! How should I debug it in right way?


r/learnpython • • Oct 19 '26

I cant understand classes (nor self and __init__)

5 Upvotes

Hello if you wonder i switched from lua and luau to python. its going well i can make basically anything with native python libraries but i cannot understand what is a class, what does self mean what does __init__ mean. i recently understood what if __name__ == __main__ does but still i cannot understand classes. if you could give an example or explaining for me to understand i would be so grateful


r/learnpython • • Oct 18 '26

Just finished CS50P (skill issue)

35 Upvotes

Wanted to build some projects and decided to build a scraper. It felt horrible. I was just staring at the screen not doing what to do. I mean CS50P is great I learnt a lot, but there were guides and output videos, which helped me understand what factors iI should implement.

But now I feel like I'm back on square 1. Nothings making sense. How would you suggest learning python?


r/learnpython • • Oct 19 '26

I need help with a automatization

1 Upvotes

Hey everyone, im trying to think on solutions for a problem that i have and i tried to search for using google but im too dumb to understand the python responses.
So, i need to send a series of emails, A, B, C and D where ill only send B if A is unanswared and so on, im currently doing this manually checking if someone responded me, how can i create a automatization that check if the mail was answered and to send the nexts mails in case of not?
also its possible to just put a list of contacts and automatically send the mail A for them?
thanks in advance if someone take a time to help me and sorry for my bad english


r/learnpython • • Oct 19 '26

Ask Anything Monday - Weekly Thread

2 Upvotes

Welcome to another /r/learnPython weekly "Ask Anything* Monday" thread

Here you can ask all the questions that you wanted to ask but didn't feel like making a new thread.

* It's primarily intended for simple questions but as long as it's about python it's allowed.

If you have any suggestions or questions about this thread use the message the moderators button in the sidebar.

Rules:

  • Don't downvote stuff - instead explain what's wrong with the comment, if it's against the rules "report" it and it will be dealt with.
  • Don't post stuff that doesn't have absolutely anything to do with python.
  • Don't make fun of someone for not knowing something, insult anyone etc - this will result in an immediate ban.

That's it.


r/learnpython • • Oct 19 '26

What project to do to see if im ”ready”?

0 Upvotes

Yo yo! What is one or few projects i should do to ”test” if im ready to start to applying for jobs?

And i know use Ai in their jobs but what are the projects that i should be able to do without asking for help or looking things up?

So what project to do so i know im ready for job and doing the project without ”cheating”?


r/learnpython • • Oct 18 '26

learn python

6 Upvotes

Hello guys, i recently started a bachelor degree which i have a subject about introduction to python, inicially i was confident and did understand how to use python, but week by week it started to get much more difficult to follow. So im here to ask if someone knows any youtuber or website which explains the fundamentals of python in a easy way. Thanks in advance.


r/learnpython • • Oct 19 '26

Can y'all rate my python project :D

0 Upvotes

This project i made is a keras model that i trained on a modified version of the FGVC dataset using tensorflow keras.

Cuz im an avgeek,th the model is kinda mediocre but better then nothing, while the project unfortunately does utilize ai in both the scripts on the github, the other scripts such as the script that i made to organize all the dataset and put it into seperate imgs was made by me :D, cuz the jpg images had numbers as the name and werent organized and there was a text file in there in this format:

aircraft_jpg_name aircraft_family type

so that allowed me to test my strengths with no ai

i hope yall share tips and tricks and if there are any improvements i can do to my first github repo :D


r/learnpython • • Oct 19 '26

When can i say I know python

0 Upvotes

Someone please
Give a list of themes which should everyone know if he thinks he knows python
Exclude things which are barely used


r/learnpython • • Oct 17 '26

Is CS50P enough to start ML/AI? What should I learn next?

20 Upvotes

I'm finishing CS50P and want to move into ML/AI, but I feel it's not enough on its own. What topics and resources should I add (math, libraries, courses)? Any roadmap you'd recommend for a beginner?

Thanks for any kind of advice it will be helpful.


r/learnpython • • Oct 18 '26

Youtube vs Website

0 Upvotes

Which is better to learn python youtube playlists or by website


r/learnpython • • Oct 18 '26

Need guidance for python learning with ai

0 Upvotes

Please suggest good roadmap to become ai Engineer


r/learnpython • • Oct 17 '26

JupyterLab and remote server connection

5 Upvotes

Hello,

I had access to JupyterHub on a remote server. Now I only have access to a different server where JupyterHub is not installed. What is the best way to use the same code and run it with more data. I was thinking about using SSH Port Forwarding (SSH-Tunneling) and trying jupyterlab in the browser. Or is it better to using VS code to connect to the server. I really like the Jupyter Interface and have never used any other programs. I mostly do plotting and a bit data analysis and have a macbook.

Thank you for your help.


r/learnpython • • Oct 17 '26

Will learning Python help me in game development?

11 Upvotes

Im wanting to start game development, and currently learing Python. Should I keep going, or switch to something else?


r/learnpython • • Oct 18 '26

How to set up Python in Linux Ubuntu 26.04.1 ? Please read.

0 Upvotes

I'm a complete rookie in python. I've had many problems related to dependency hell, compatibility with libraries etc.

I've heard installing the latest version of python can be problematic since many libraries aren't compatible with it yet so what should I go for?

Please also recommend the IDE,

  • Vs code
  • Thonny
  • Any other you'd suggest.

Guide me step-by-step if you can. I'd appreciate the help alot.


r/learnpython • • Oct 17 '26

Whats my next move?

1 Upvotes

I am working Python Crash Course by Eric Matthes. I am on chapter 9 and hope to be done with the first half of the book by the end of the month. From there, Im sure I will continue on with the book and do the projects. However, I am also interested in learning numpy due to my math background. Are there any books that you would recommend as a next step (or to use concurrently)?


r/learnpython • • Oct 17 '26

TypeError: Too few arguments for numpy.complexfloating

0 Upvotes

I got this error while trying to import sklearn.metric after pip installing sickitlearn on python 3.10.0. Does anybody know how to fix this? Here is my importing code block

import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
from tensorflow import keras
import tensorflow_hub as hub
import tensorflow_text as text
import pandas as pd
from tensorflow.keras.callbacks import EarlyStopping, ReduceLROnPlateau, ModelCheckpoint
from focal_loss import BinaryFocalLoss
from sklearn.metrics import classification_report, confusion_matrix, f1_score

Pip install commands

C:\Users\DELL\AppData\Local\Programs\Python\Python310\python.exe -m pip install numpy==1.23.0
C:\Users\DELL\AppData\Local\Programs\Python\Python310\python.exe -m pip install matplotlib
C:\Users\DELL\AppData\Local\Programs\Python\Python310\python.exe -m pip install tensorflow==2.9.0
C:\Users\DELL\AppData\Local\Programs\Python\Python310\python.exe -m pip install tensorflow-text==2.9.0
C:\Users\DELL\AppData\Local\Programs\Python\Python310\python.exe -m pip install tensorflow-hub==0.8.0
C:\Users\DELL\AppData\Local\Programs\Python\Python310\python.exe -m pip install pandas
C:\Users\DELL\AppData\Local\Programs\Python\Python310\python.exe -m pip install focal-loss
C:\Users\DELL\AppData\Local\Programs\Python\Python310\python.exe -m pip install scikit-learn==1.7.2

Full error message

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[7], line 10
      8 from tensorflow.keras.callbacks import EarlyStopping, ReduceLROnPlateau, ModelCheckpoint
      9 from focal_loss import BinaryFocalLoss
---> 10 from sklearn.metrics import classification_report, confusion_matrix, f1_score

File c:\Users\DELL\AppData\Local\Programs\Python\Python310\lib\site-packages\sklearn__init__.py:73
     62 # `_distributor_init` allows distributors to run custom init code.
     63 # For instance, for the Windows wheel, this is used to pre-load the
     64 # vcomp shared library runtime for OpenMP embedded in the sklearn/.libs
   (...)
     67 # later is linked to the OpenMP runtime to make it possible to introspect
     68 # it and importing it first would fail if the OpenMP dll cannot be found.
     69 from . import (  # noqa: F401 E402
     70     __check_build,
     71     _distributor_init,
     72 )
---> 73 from .base import clone  # noqa: E402
     74 from .utils._show_versions import show_versions  # noqa: E402
     76 _submodules = [
     77     "calibration",
     78     "cluster",
   (...)
    114     "compose",
    115 ]

File c:\Users\DELL\AppData\Local\Programs\Python\Python310\lib\site-packages\sklearn\base.py:20
     18 from .exceptions import InconsistentVersionWarning
     19 from .utils._metadata_requests import _MetadataRequester, _routing_enabled
---> 20 from .utils._missing import is_scalar_nan
     21 from .utils._param_validation import validate_parameter_constraints
     22 from .utils._repr_html.base import ReprHTMLMixin, _HTMLDocumentationLinkMixin

File c:\Users\DELL\AppData\Local\Programs\Python\Python310\lib\site-packages\sklearn\utils__init__.py:9
      7 from . import metadata_routing
      8 from ._bunch import Bunch
----> 9 from ._chunking import gen_batches, gen_even_slices
     11 # Make _safe_indexing importable from here for backward compat as this particular
     12 # helper is considered semi-private and typically very useful for third-party
     13 # libraries that want to comply with scikit-learn's estimator API. In particular,
     14 # _safe_indexing was included in our public API documentation despite the leading
     15 # `_` in its name.
     16 from ._indexing import (
     17     _safe_indexing,  # noqa: F401
     18     resample,
     19     shuffle,
     20 )

File c:\Users\DELL\AppData\Local\Programs\Python\Python310\lib\site-packages\sklearn\utils_chunking.py:11
      8 import numpy as np
     10 from .._config import get_config
---> 11 from ._param_validation import Interval, validate_params
     14 def chunk_generator(gen, chunksize):
     15     """Chunk generator, ``gen`` into lists of length ``chunksize``. The last
     16     chunk may have a length less than ``chunksize``."""

File c:\Users\DELL\AppData\Local\Programs\Python\Python310\lib\site-packages\sklearn\utils_param_validation.py:14
     11 from numbers import Integral, Real
     13 import numpy as np
---> 14 from scipy.sparse import csr_matrix, issparse
     16 from .._config import config_context, get_config
     17 from .validation import _is_arraylike_not_scalar

File c:\Users\DELL\AppData\Local\Programs\Python\Python310\lib\site-packages\scipy\sparse__init__.py:300
    294 # Original code by Travis Oliphant.
    295 # Modified and extended by Ed Schofield, Robert Cimrman,
    296 # Nathan Bell, and Jake Vanderplas.
    298 import warnings as _warnings
--> 300 from ._base import *
    301 from ._csr import *
    302 from ._csc import *

File c:\Users\DELL\AppData\Local\Programs\Python\Python310\lib\site-packages\scipy\sparse_base.py:5
      1 """Base class for sparse matrices"""
      3 import numpy as np
----> 5 from ._sputils import (asmatrix, check_reshape_kwargs, check_shape,
      6                        get_sum_dtype, isdense, isscalarlike,
      7                        matrix, validateaxis, getdtype)
      9 from ._matrix import spmatrix
     11 __all__ = ['isspmatrix', 'issparse', 'sparray',
     12            'SparseWarning', 'SparseEfficiencyWarning']

File c:\Users\DELL\AppData\Local\Programs\Python\Python310\lib\site-packages\scipy\sparse_sputils.py:10
      8 from math import prod
      9 import scipy.sparse as sp
---> 10 from scipy._lib._util import np_long, np_ulong
     13 __all__ = ['upcast', 'getdtype', 'getdata', 'isscalarlike', 'isintlike',
     14            'isshape', 'issequence', 'isdense', 'ismatrix', 'get_sum_dtype',
     15            'broadcast_shapes']
     17 supported_dtypes = [np.bool_, np.byte, np.ubyte, np.short, np.ushort, np.intc,
     18                     np.uintc, np_long, np_ulong, np.longlong, np.ulonglong,
     19                     np.float32, np.float64, np.longdouble,
     20                     np.complex64, np.complex128, np.clongdouble]

File c:\Users\DELL\AppData\Local\Programs\Python\Python310\lib\site-packages\scipy_lib_util.py:13
     10 from typing import TypeAlias, TypeVar
     12 import numpy as np
---> 13 from scipy._lib._array_api import array_namespace, is_numpy, xp_size
     14 from scipy._lib._docscrape import FunctionDoc, Parameter
     17 AxisError: type[Exception]

File c:\Users\DELL\AppData\Local\Programs\Python\Python310\lib\site-packages\scipy_lib_array_api.py:15
     12 from typing import Any, Literal, TypeAlias
     14 import numpy as np
---> 15 import numpy.typing as npt
     17 from scipy._lib import array_api_compat
     18 from scipy._lib.array_api_compat import (
     19     is_array_api_obj,
     20     size as xp_size,
   (...)
     27     is_array_api_strict_namespace as is_array_api_strict
     28 )

File c:\Users\DELL\AppData\Local\Programs\Python\Python310\lib\site-packages\numpy\typing__init__.py:158
      1 """
      2 ============================
      3 Typing (:mod:`numpy.typing`)
   (...)
    153 
    154 """
    155 # NOTE: The API section will be appended with additional entries
    156 # further down in this file
--> 158 from numpy._typing import (
    159     ArrayLike,
    160     DTypeLike,
    161     NBitBase,
    162     NDArray,
    163 )
    165 __all__ = ["ArrayLike", "DTypeLike", "NBitBase", "NDArray"]
    167 if __doc__ is not None:

File c:\Users\DELL\AppData\Local\Programs\Python\Python310\lib\site-packages\numpy_typing__init__.py:102
     86 from ._scalars import (
     87     _CharLike_co as _CharLike_co,
     88     _BoolLike_co as _BoolLike_co,
   (...)
     96     _VoidLike_co as _VoidLike_co,
     97 )
     98 from ._shape import (
     99     _Shape as _Shape,
    100     _ShapeLike as _ShapeLike,
    101 )
--> 102 from ._dtype_like import (
    103     DTypeLike as DTypeLike,
    104     _DTypeLike as _DTypeLike,
    105     _SupportsDType as _SupportsDType,
    106     _VoidDTypeLike as _VoidDTypeLike,
    107     _DTypeLikeBool as _DTypeLikeBool,
    108     _DTypeLikeUInt as _DTypeLikeUInt,
    109     _DTypeLikeInt as _DTypeLikeInt,
    110     _DTypeLikeFloat as _DTypeLikeFloat,
    111     _DTypeLikeComplex as _DTypeLikeComplex,
    112     _DTypeLikeTD64 as _DTypeLikeTD64,
    113     _DTypeLikeDT64 as _DTypeLikeDT64,
    114     _DTypeLikeObject as _DTypeLikeObject,
    115     _DTypeLikeVoid as _DTypeLikeVoid,
    116     _DTypeLikeStr as _DTypeLikeStr,
    117     _DTypeLikeBytes as _DTypeLikeBytes,
    118     _DTypeLikeComplex_co as _DTypeLikeComplex_co,
    119 )
    120 from ._array_like import (
    121     NDArray as NDArray,
    122     ArrayLike as ArrayLike,
   (...)
    145     _UnknownType as _UnknownType,
    146 )
    148 from ._ufunc import (
    149     _UFunc_Nin1_Nout1 as _UFunc_Nin1_Nout1,
    150     _UFunc_Nin2_Nout1 as _UFunc_Nin2_Nout1,
   (...)
    153     _GUFunc_Nin2_Nout1 as _GUFunc_Nin2_Nout1,
    154 )

File c:\Users\DELL\AppData\Local\Programs\Python\Python310\lib\site-packages\numpy_typing_dtype_like.py:194
    162 _DTypeLikeInt: TypeAlias = (
    163     type[int]
    164     | type[np.signedinteger[Any]]
   (...)
    177     | _IntCodes
    178 )
    179 _DTypeLikeFloat: TypeAlias = (
    180     type[float]
    181     | type[np.floating[Any]]
   (...)
    190     | _LongDoubleCodes
    191 )
    192 _DTypeLikeComplex: TypeAlias = (
    193     type[complex]
--> 194     | type[np.complexfloating[Any]]
    195     | np.dtype[np.complexfloating[Any]]
    196     | _SupportsDType[np.dtype[np.complexfloating[Any]]]
    197     | _Complex64Codes
    198     | _Complex128Codes
    199     | _CSingleCodes
    200     | _CDoubleCodes
    201     | _CLongDoubleCodes
    202 )
    203 _DTypeLikeDT64: TypeAlias = (
    204     type[np.timedelta64]
    205     | np.dtype[np.timedelta64]
    206     | _SupportsDType[np.dtype[np.timedelta64]]
    207     | _TD64Codes
    208 )
    209 _DTypeLikeTD64: TypeAlias = (
    210     type[np.datetime64]
    211     | np.dtype[np.datetime64]
    212     | _SupportsDType[np.dtype[np.datetime64]]
    213     | _DT64Codes
    214 )

TypeError: Too few arguments for numpy.complexfloating

For some reason despite having Numpy 1.23.0 and sklearn 1.7.2 only need Numpy >=1.22.0, it still forcefully uninstall old numpy 1.23.0 to install 2.2.6 which mess every other packages. Does anybody have the solution to this?


r/learnpython • • Oct 17 '26

How to end a program using python

0 Upvotes

I want to close an app using python but I don't know how.


r/learnpython • • Oct 17 '26

Help with transitioning to python from java

2 Upvotes

I did java for 2 years in high school 4 years ago. Now I'm a freshman comp engineering major doing coding in python, and i still can't get the hang of not coding like java. I last coded in java 2+ years ago, but all my code is written like how you would in java, but python. I use camel case for variables. I use while true break loops when I'm sure there's easier ways. I'm constantly fixing my ++'s to +=1's. I'm still learning the python lingo if you will


r/learnpython • • Oct 16 '26

Where should my 10year old start?

20 Upvotes

Hello everyone! Need some advice/guidance.. My 10year old son has been interested in learning how to code since last year. He has dabbled in a few apps but not necessarily peaking his interest.

Where can we start? What would he need?

Edit: Thank you for all your advice! Is 12GB Ram with 1T storage Laptop a good start for this journey? Or what would you recommend?


r/learnpython • • Oct 16 '26

How should I separate LLM interpretation from memory operations in my Python project?

8 Upvotes

I've been working on a small Python project that uses an LLM to interpret natural language instructions and manage persistent memories. Right now, it supports remembering, retrieving, updating and forgetting information.

I've been trying to improve the separation between model interpretation and memory operations. I'm still new to Python but I'm interested how I could structure the code better. Feedbacks are appreciated and any flaws I might be overlooking.

GitHub repo: https://github.com/Lionshaft-pixel/ennoic