Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

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

Aberta
#29 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

@tanujb03 já está trabalhando nisso.

Desde 10/10/2026.

  • #32 de @tanujb03 — aberto

Avaliação

Dificuldade
1/5
Tempo estimado
Menos de uma hora
Facilidade para iniciantes
15/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Estagnada
Stack de tecnologia
python
Domínio
tooling

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
Python
Estrelas
1
Forks
6
Merge médio
17h 52min
PRs com merge (30d)
14

Preparar o ambiente

  • Sem Dockerfile nem arquivo Docker Compose
  • Tem um modelo de pull request
  • Sem guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de techcsispit/code-corner

Todas as issues de techcsispit/code-corner

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.