Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

run.py: Python solutions are skipped on Windows when run via python instead of python3

Ouverte
#29 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@tanujb03 y travaille déjà.

Depuis le 10/10/2026.

  • #32 par @tanujb03 — ouverte

Évaluation

Difficulté
1/5
Temps estimé
Moins d'une heure
Accessibilité débutants
15/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
À l'abandon
Stack technique
python
Domaine
tooling

Piste de recherche

The bug is in run.py, where LANGUAGES[".py"] hardcodes "python3" as the interpreter, so Python solutions are skipped on Windows when only python exists. Check whether the runner can use sys.executable for the .py entry instead, then run python run.py --lang py on Windows and confirm the six solution.py and solution_naive.py files execute and are checked against cases.txt. Pull request #32 already targets this, so review it before starting new work.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

bug good first issue

What I did

  1. Fresh checkout of main on Windows 11 with Python installed via the standard python.org Windows installer (providing python.exe on PATH, with no python3.exe symlink/binary).
  2. Run the solution check using the command specified in the README:
python run.py --lang py

What I expected
The README section "Running the checks" says:

"It needs Python 3. On Windows the command is python. Solutions in languages you don't have installed are skipped."

Because Python 3 is installed and running run.py, the 6 Python solutions (solution.py across problems) should be executed and checked against cases.txt.

What happened instead
Every Python solution is skipped because run.py looks specifically for python3:

anagram
binary-search
  skip  solution.py (python3 isn't installed)
fibonacci
  skip  solution.py (python3 isn't installed)
  skip  solution_naive.py (python3 isn't installed)
palindrome
  skip  solution.py (python3 isn't installed)
prime
  skip  solution.py (python3 isn't installed)
roman-numerals
  skip  solution.py (python3 isn't installed)

Summary: 0 passed, 0 failed, 6 skipped

The runner exits 0, skipping all Python checks even though Python 3 is actively executing the runner. On Windows machines with Microsoft Store app aliases enabled, shutil.which('python3') resolves to the WindowsApps stub, which errors out with "Python was not found", causing every Python solution to fail spuriously.

In run.py, LANGUAGES[".py"] hardcodes "python3":

".py": ("python3", None, ["python3", "{src}"])

Instead, using sys.executable ensures the runner launches solutions with the same Python 3 interpreter currently executing run.py.

Environment
Windows 11, Python 3.14 (python.exe), code-corner main @ 0c95800.

I would like to work on this fix.

Langage dominant
Python
Étoiles
1
Forks
6
Merge moyen
17 h 52 min
PR mergées (30 j)
14

Préparer son environnement

  • Aucun Dockerfile ni fichier Docker Compose
  • Propose un modèle de pull request
  • Aucun guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de techcsispit/code-corner

Toutes les issues de techcsispit/code-corner

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.