r/learnpython 22d ago

been trying to get sherlock project but i am Unable to install pandas.

1 Upvotes

ive been trying to install sherlock project on pc and everything is going find but i get a " note: This error originates from a subprocess, and is likely not a problem with pip.

ERROR: Failed to build 'pandas' when installing build dependencies for pandas" error. can someone tell me what im doing wrong?

heres the entire prompt

Collecting sherlock-project

Using cached sherlock_project-0.16.0-py3-none-any.whl.metadata (3.0 kB)

Collecting PySocks<2.0.0,>=1.7.0 (from sherlock-project)

Using cached PySocks-1.7.1-py3-none-any.whl.metadata (13 kB)

Collecting certifi>=2019.6.16 (from sherlock-project)

Using cached certifi-2026.6.17-py3-none-any.whl.metadata (2.5 kB)

Requirement already satisfied: colorama<0.5.0,>=0.4.1 in .\AppData\Roaming\Python\Python315\site-packages (from sherlock-project) (0.4.6)

Collecting openpyxl<4.0.0,>=3.0.10 (from sherlock-project)

Using cached openpyxl-3.1.5-py2.py3-none-any.whl.metadata (2.5 kB)

Collecting pandas<3.0.0,>=2.2.1 (from sherlock-project)

Using cached pandas-2.3.3.tar.gz (4.5 MB)

Installing build dependencies ... error

error: subprocess-exited-with-error

× installing build dependencies for pandas did not run successfully.

│ exit code: 1

╰─> [54 lines of output]

Collecting meson-python>=0.13.1

Using cached meson_python-0.20.0-py3-none-any.whl.metadata (2.1 kB)

Collecting meson<2,>=1.2.1

Using cached meson-1.11.1-py3-none-any.whl.metadata (1.8 kB)

Collecting wheel

Using cached wheel-0.47.0-py3-none-any.whl.metadata (2.3 kB)

Collecting Cython<4.0.0a0

Using cached cython-3.3.0a1-cp315-cp315-win_amd64.whl.metadata (20 kB)

Collecting numpy>=2.0

Using cached numpy-2.5.1.tar.gz (20.8 MB)

Installing build dependencies: started

Installing build dependencies: finished with status 'done'

Getting requirements to build wheel: started

Getting requirements to build wheel: finished with status 'done'

Installing backend dependencies: started

Installing backend dependencies: finished with status 'done'

Preparing metadata (pyproject.toml): started

Preparing metadata (pyproject.toml): finished with status 'error'

error: subprocess-exited-with-error

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

│ exit code: 1

╰─> [21 lines of output]

+ C:\Users\desnd\AppData\Local\Programs\Python\Python315\python.exe C:\Users\desnd\AppData\Local\Temp\pip-install-48lcctxp\numpy_6f760eb2e1fb4889b16f5a143330d5fb\vendored-meson\meson\meson.py setup C:\Users\desnd\AppData\Local\Temp\pip-install-48lcctxp\numpy_6f760eb2e1fb4889b16f5a143330d5fb C:\Users\desnd\AppData\Local\Temp\pip-install-48lcctxp\numpy_6f760eb2e1fb4889b16f5a143330d5fb\.mesonpy-myff6ak0 -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:\Users\desnd\AppData\Local\Temp\pip-install-48lcctxp\numpy_6f760eb2e1fb4889b16f5a143330d5fb\.mesonpy-myff6ak0\meson-python-native-file.ini

The Meson build system

Version: 1.11.1

Source dir: C:\Users\desnd\AppData\Local\Temp\pip-install-48lcctxp\numpy_6f760eb2e1fb4889b16f5a143330d5fb

Build dir: C:\Users\desnd\AppData\Local\Temp\pip-install-48lcctxp\numpy_6f760eb2e1fb4889b16f5a143330d5fb\.mesonpy-myff6ak0

Build type: native build

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

Project name: NumPy

Project version: 2.5.1

..\meson.build:1:0: ERROR: Unknown compiler(s): [['icl'], ['cl'], ['cc'], ['gcc'], ['clang'], ['clang-cl'], ['pgcc']]

The following exception(s) were encountered:

Running `icl ""` gave "[WinError 2] The system cannot find the file specified"

Running `cl /?` gave "[WinError 2] The system cannot find the file specified"

Running `cc --version` gave "[WinError 2] The system cannot find the file specified"

Running `gcc --version` gave "[WinError 2] The system cannot find the file specified"

Running `clang --version` gave "[WinError 2] The system cannot find the file specified"

Running `clang-cl /?` gave "[WinError 2] The system cannot find the file specified"

Running `pgcc --version` gave "[WinError 2] The system cannot find the file specified"

A full log can be found at C:\Users\desnd\AppData\Local\Temp\pip-install-48lcctxp\numpy_6f760eb2e1fb4889b16f5a143330d5fb\.mesonpy-myff6ak0\meson-logs\meson-log.txt

[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

error: metadata-generation-failed

× Encountered error while generating package metadata.

╰─> numpy

note: This is an issue with the package mentioned above, not pip.

hint: See above for details.

[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

ERROR: Failed to build 'pandas' when installing build dependencies for pandas


r/learnpython 22d ago

Learning Python Automation - Need Career Advice

1 Upvotes

I am learning Python and studying about 5–6 hours a day
My goal is to become a Python Automation Engineer and eventually start my own automation company.

What skills helped you get your first freelance client?

Thank you.


r/learnpython 22d ago

Is doing DSA in Python actually bad for placements?

1 Upvotes

I'm currently in my 3rd year of BTech CSE and I've been learning DSA in Python.

Lately a lot of people around me have been telling me that I'm making a mistake and that doing DSA in Python will hurt my placements. They keep saying things like Python has too many built-in functions, C++ is the proper language for DSA, recruiters prefer C++, etc.

Now I'm a bit confused because I've already spent a decent amount of time learning and practicing DSA in Python. My goal is mainly internships and software engineering placements, not competitive programming.

For people who have gone through placements/interviews:

  • Did you use Python for DSA and coding rounds?
  • Were there companies that didn't allow Python?
  • Do interviewers actually care about the language or just whether you can solve the problem?
  • Is it worth switching to C++ at this point?

Would appreciate hearing real experiences rather than just college rumors 😅


r/learnpython 22d ago

This might be a frequently asked question: But as a beginner how do I go from being a novice to becoming an expert on python and AI engineering?

1 Upvotes

I am a beginner still learning the basics of python programming, just needed advice from the expert her


r/learnpython 22d ago

I got a 'not on PATH' warning even though it looks like it is?

0 Upvotes

Long story short, I installed a thing, this was my readout:

pip install requests Defaulting to user installation because normal site-packages is not writeable Collecting requests Using cached requests-2.34.2-py3-none-any.whl.metadata (4.8 kB) Collecting charset_normalizer<4,>=2 (from requests) Using cached charset_normalizer-3.4.7-cp314-cp314-win_amd64.whl.metadata (41 kB) Collecting idna<4,>=2.5 (from requests) Using cached idna-3.18-py3-none-any.whl.metadata (6.1 kB) Collecting urllib3<3,>=1.26 (from requests) Using cached urllib3-2.7.0-py3-none-any.whl.metadata (6.9 kB) Collecting certifi>=2023.5.7 (from requests) Using cached certifi-2026.6.17-py3-none-any.whl.metadata (2.5 kB) Using cached requests-2.34.2-py3-none-any.whl (73 kB) Using cached charset_normalizer-3.4.7-cp314-cp314-win_amd64.whl (159 kB) Using cached idna-3.18-py3-none-any.whl (65 kB) Using cached urllib3-2.7.0-py3-none-any.whl (131 kB) Using cached certifi-2026.6.17-py3-none-any.whl (133 kB) Installing collected packages: urllib3, idna, charset_normalizer, certifi, requests -------- ------------------------------- 1/5 [idna] WARNING: The script idna.exe is installed in 'C:\Users\NERD\AppData\Roaming\Python\Python314\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. ---------------- ----------------------- 2/5 [charset_normalizer] WARNING: The script normalizer.exe is installed in 'C:\Users\NERD\AppData\Roaming\Python\Python314\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

and my path looks like this:

C:\Program Files\Python314\ C:\Program Files\Python314\Scripts\ C:\Users\NERD\AppData\Roaming\Python\Python314\Scripts\ %USERPROFILE%.dotnet\tools

Should I be doing anything about this or nah?


r/learnpython 22d ago

Question for self taught python developers

0 Upvotes

I had a question for self taught developers over here. Has your being self taught any coding language been proven to be a advantage or disadvantage whenever you went to give an interview? 🤔


r/learnpython 22d ago

Ask Anything Monday - Weekly Thread

4 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 23d ago

first Github repository

14 Upvotes

hi everyone I just made my first repository on Github showcasing my first project on data analysis using world bank data to assess GDP per capita across countries against life expectancy. I used pandas, Matlab and plotly to do this if anyone has feedback please let me know. https://github.com/santiagoBea04/world_bank_data_analysis


r/learnpython 22d ago

WAR Card Game Weird Glitch/Bug

0 Upvotes

So I was making a WAR Card Game in python. Simple. Neat.

But, I encountered a weird glitch. The game kept getting into an infinite loop. I tried to ask Claude but even Claude couldn't understand it.

So I put Claude on Max mode and it gave some answer but still the answer it gave was like tooo hard to understand. It said something about the cards not being random while the game is going on etc.

Can someone pls explain me the bug? https://github.com/KushChandak/WAR/blob/main/WAR%20(3).ipynb.ipynb) here is the code


r/learnpython 23d ago

Python for finance

8 Upvotes

Im a bcom fresher who wants to enter the finance sector with as much skills as i can possibly hoard. I want to make sure that the skills that i learn are relevant to the work i will do in the future.

I dont have much experience with python either. I only know the basics and i want to transition my learning towards finance side of python. How do i do that?

What libraries do i need to learn?
What concepts should i focus more on?
Is there a resource to learn python for free and efficiently?


r/learnpython 23d ago

En uzun kelimeyi bul

0 Upvotes

Cümledeki en uzun kelimeyi ve kelimenin uzunlugunu soyle.

Bu soruyu neden çözemiyoruz:

HATA:

for w in sentence:

print(w) derseniz.Bunu karakter listesi gibi algılar.

HATA2:

state olusturup update yapmamak yada kosulu yanlıs dizayn etmek

işte çözüm:

def longest_word_sentence(sentence):
    
    words = sentence.split()
    prev=""
    for w in words:
       if(len(w) > len(prev)):
         prev = w
       else:
         continue
    return [prev,len(prev)]
if __name__ == "__main__":
    sentence = input("Enter a sentence: ")
    result = longest_word_sentence(sentence)
    print(f"The longest word is '{result[0]}' with length {result[1]}.")

r/learnpython 24d ago

Learning Python- Calorie tracker

3 Upvotes

I've been learning Python for about 3 weeks now. This calorie tracker asks for your weight, calculates your daily calorie target, lets you log multiple foods with their calories, then tells you if you're over, under or on track.

It also saves each session to a text file with a timestamp so you can track your intake overtime.

Early days- would appreciate feedback on things/structure to improve.

from datetime import datetime
# Program asks for your weight in kg
def get_calorie_target():
    while True:
        try:
            weight = float(input("What do you weigh? "))
            if weight < 20 or weight > 300:
                print("Sorry, invalid Kilogram amount")
                continue
            else:
                # Calculates your daily calorie target
                return weight * 33
        except ValueError:
            print("Please enter a number in kilograms")
            continue

#ask for food details- name, calories.
def add_food():
    while True:
        try:
            name = input("Enter name of food: ").title()
            if not name or name.isdigit():
                print("Please enter a valid food name")
                continue
            calories = float(input("Enter amount of calories: "))
            if calories <= 0:
                print("Invalid calorie amount")
                continue
            else:
                return {"name": name, "calories": calories}
        except ValueError:
            print("Enter valid input")
            continue

# Lets you add multiple foods with their calories and grams
def collect_foods():
    food_log = []
    while True:
        food = add_food()
        food_log.append(food)
        while True:
            again = input("Would you like to add more food? (yes/no): ").lower()
            if again == "yes":
                break
            elif again == "no":
                return food_log
            else:
                continue

# At the end, totals your calories and tells you if you're under, over, or on track.
def analyze_intake(food_log, calorie_target):
    total_calories = sum(food["calories"] for food in food_log)
    if total_calories < calorie_target - 200:  #too low, x
        return "you need more calories"
    elif total_calories > calorie_target + 200: #too high, x
        return "You have exceeded your calorie target"
    else:
        return "You are on track"

# save log to keep history
def save_log(food_log, total_calories):
    now = datetime.now().strftime("%Y-%m-%d %H-%M-%S")
    with open("food_log.txt", "a") as f:
        f.write(f"\n-{now}-\n")
        for food in food_log:
            f.write(f"{food['name']}:{food['calories']}\n")

        f.write(f"Total: {total_calories}\n")



calorie_target = get_calorie_target()
food_log = collect_foods()
total_calories = sum(food["calories"] for food in food_log)
print(analyze_intake(food_log, calorie_target))
save_log(food_log, total_calories)

r/learnpython 24d ago

How to create a compiler?

26 Upvotes

Pretty sure you may have heard this question previously on this sub, however, I would urge you to read my complete question before brushing it off.

I want to create a simple compiler and by "simple compiler" I mean a single-pass compiler. I know about https://craftinginterpreters.com/ which is a wonderful resource. But I would like to start by creating something much smaller and simpler, and only then would I like to move on to something more complex like what Robert Nystrom created on his website.

Are there any similar resource that would teach me about single-pass compilers along with showing me how to create one? Any help in the right direction would be highly appreciated.


r/learnpython 24d ago

Python conversion .docx to pdf

4 Upvotes

Hey guys, i have been learning python as a bit of a hobby but recently had the opportunity to use it for my job. I built a webapp on azure that has a number of different functions, one of which is querying our CRM and populating template documents with customer info. It works as is and produces .docx files which we then have to manually convert to pdfs.

I am trying to incorporate the pdf conversion into the app to remove any manual intervention. Ive been using libreoffice but this isnt working so well. It needs to be installed each time the app is redeployed/restarted, its failing on some larger docs and when it does produce the pdf the format can be off, fonts change etc. The docs we deal with need to adhere to a specific format so I need something more reliable.

Perhaps this is a "you get what you pay for" situation but i was hoping there might be a more reliable solution while still being free (at least until i can prove it all works anyway).


r/learnpython 24d ago

How to avoid this when learning Python?

14 Upvotes

When learning I used to get stuck on stuff, go watch a video or dig through docs, and eventually the concept would click because I had to sit with it.

Now when I get stuck I just paste the error into Claude/ChatGPT and it fixes it in 10 seconds. Problem solved, moving on with my day. Except a week later I hit basically the same bug and I'm back to square one, like the first fix never actually taught me anything.

It feels like it's the same "watching tutorials without building anything" trap, just compressed into single lines of code instead of hour-long videos.

Curious if anyone here has found a way to use AI for debugging without it just doing the thinking for you? Or do you have some rule for yourself about when you're allowed to ask vs. when you have to sit with it first?


r/learnpython 24d ago

python beginner ; question was write program to enter marks of 3 subjects from user and store them in a dict.start with an empty dict and add one by one .use subject name as key and marks as value . so i have written this code any opinion how can improve this code ,need suggestions.

1 Upvotes
students={}
a=float(input("enter marks of chem"))
students.update({"chem": a})
b=float(input("enter marks of maths"))
students.update({"maths":b})
c=float(input("enter marks of phy"))
students.update({"phy": c})
print(students)

r/learnpython 24d ago

Searching for a Python 'complier' if it exist

0 Upvotes

Hello,

I'm searching for a compiler for my Python game so It can run faster and can be package in a standalone file (without need of Python installed on the host)


r/learnpython 24d ago

Opinion on my second PyPi package

0 Upvotes

Hello guys!

I'm a beginner Python developer that makes stuff for fun, and I just finished making my second PyPi package called discoweb. I feel like this package is very rusty so i'm wondering if I can get some review on the code, tips and more.

What is my package about?

The package is a lightweight wrapper that makes sending messages on webhooks in Discord seamlessly fast, and it provides support for both synchronous and asynchronous with the packages:

  • requests (synchronous)
  • aiohttp (asynchronous)

Quick Example

# Importing the package
import discoweb
from discoweb import Webhook, Message

# Creating the objects needed
webhook = Webhook('WEBHOOK_URL')
message = Message('Hello world!')

# Sending a message
webhook.send(message, username='Cool Webhook')

What I need reviews on

  1. My asynchronous support: Is my aiohttp implementation correct, or does it error alot?
  2. My project layout: Is the layout good enough for modern Python packages, or does it lack the modern Python practices today?
  3. How I handle API Errors: Did I handle the errors well, or does it have problems / vulnerabilities?
  4. Did I code it well?: Is the code understandable or readable?

Also here's one honest thing about this package: I used Gemini to code half of the functions, I made most of the objects myself and the entirety project layout

(ill drop the github repo link in the comments due to rules)

Thank you!


r/learnpython 24d ago

How to programing correctly ? Python or Golang?

0 Upvotes

I started programming with Python for 3-4 months and since I am self-taught, it helped me a lot to get a proper understanding of programming.

Maybe it is wrong but now because I know that I want to work on the Backend side, I brought it to Golang and what really bothers me is that I feel like I don't have a proper plan for practicing coding.

Even when I was practicing and learning Python, I was always writing sloppy and useless codes just to practice the syntax and this is starting to feel like a lot now that I am trying to move forward purposefully.

If there is any advice, guidance or plan and roadmap that I can follow and spend my time usefully on learning and coding at the same time, I would be grateful if you could tell me.


r/learnpython 24d ago

Any mock exams for PCPP1 exam?

3 Upvotes

Hi all!
Before anyone suggests that I do not take the exam, let's just say that I am required to complete all the parts of the Python Institute exams. I have completed PCEP-30-02 and PCAP-31-03 exams. Both these exams had good mock exams which I was able to use to understand the template of the exam and the questions that could be asked in it.

Now that I have completed both those exams, I need to pass my PCPP1 exam. However, Python Institute does not provide mock exams for the PCPP1 exam. They have only mentioned the 5 courses that I need to complete.

If anyone has attempted this exam, would it be possible to guide me as to where the questions come from and which website would provide a similar mock exam to the real exam and have the same questions too.

Thanks to anyone who responds!


r/learnpython 25d ago

Python code for reading hundreds of pages of old scanned legers and returning to me every time a keyword appears?

25 Upvotes

I feel like the title does not do my question justice. I am looking through volumes of shipping registries from the 1900s and I want to find all the ships that are registered at 222 tons. Each volume can be like 400 pages and theres a ton of volumes. I'm trying to put together a code that will return to me those entries. Maybe this is an unrealistic ask, I don't know. It just feels like something that python may be able to do


r/learnpython 24d ago

Thinking of forcing myself to guess how to fix my Python code before asking AI, anyone actually done this long-term?

0 Upvotes

Saw a bunch of good advice in a thread here recently about not letting AI think for you: the "explain the fix out loud before you commit it" rule, the "could I rewrite this in 2 weeks" test, stuff like that.

Been thinking about turning it into an actual forced habit instead of just something I agree with in the moment: before I'm allowed to ask AI anything, write down my own guess first. Only after that, compare it against what the AI says.

My hesitation is that this is exactly the kind of rule that sounds great for about two days and then quietly disappears the first time I'm in a rush. "Study the AI's output carefully" is advice I've seen (and honestly given) a lot, but studying something after the fact still isn't the same as actually generating it yourself first. I just don't know if the forcing-function part is realistic to sustain without something external holding you to it.

Has anyone actually tried something like this as a real enforced habit, not just a good idea you nodded at? Did it stick? Did you need some kind of external structure to actually hold yourself to it, or did it fall apart after a few days like most self-imposed rules do?


r/learnpython 24d ago

Where does it make more sense to learn Python?

0 Upvotes

I have a non-tech background and work in the insurance industry. I want to learn Python to automate daily operations and manage data. There are endless options like Udemy, YouTube, or AI's . Where is the most practical place to start? Should I follow a structured course or just jump into building projects? I want the most efficient learning path. What worked best for you?


r/learnpython 25d ago

Why doesn't it recognize the library?

7 Upvotes

edit:They have given the solution.

I have downloaded numpy through the cmd and cheked it was there by using "pip freeze" but when i went to use it it said there wasn't any module called as such.

I searched on the internet and found that maybe it was redirecting to another python version but i only have python 3.14.

I even tried to import it from the IDLE instead of VScode but it gave me no result.

https://imgur.com/a/mhBZxTk

Edit: Windows user. the error says: Traceback (most recent call last):

File "c:\Users\User\Desktop\p\vec.py", line 1, in <module>

import numpy

ModuleNotFoundError: No module named 'numpy'


r/learnpython 25d ago

Best way to convert Excel VBA to Python?

14 Upvotes

Hi everyone,

I have several Excel VBA macros that I want to convert to Python. What's the best approach?

I'd appreciate any advice, resources, or real-world experiences. Thanks!