Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

venv creation broken on Windows with spaces in python path

Aperta
#140 3 commenti 3 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
python
Ambito
tooling

Direzione di ricerca

Start with hooks/post_gen_project.py lines 61-65 and reproduce the venv creation command using the reported Windows Python path containing spaces. Check the remaining calls in post_gen_project.py after venv creation, and consider the issue complete when project generation succeeds without manually rerunning the commands.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

These lines to generate the virtual environment didn't work on my machine.

My python.exe is at c:\program files\python37\python.exe. Here's the error I get:

C:\temp_workspace\dash_temp>cookiecutter gh:plotly/dash-component-boilerplate
You've downloaded C:\Users\reube\.cookiecutters\dash-component-boilerplate before. Is it okay to delete and re-download it? [yes]:
project_name [my dash component]: test
project_shortname [test]:
component_name [Test]:
jl_prefix []:
r_prefix []:
author_name [Enter your first and last name (For package.json)]: test
author_email [Enter your email (For package.json)]: [email protected]
github_org []:
description [Project Description]: test
Select use_async:
1 - False
2 - True
Choose from 1, 2 [1]:
Select license:
1 - MIT License
2 - BSD License
3 - ISC License
4 - Apache Software License 2.0
5 - GNU General Public License v3
6 - Not open source
Choose from 1, 2, 3, 4, 5, 6 [1]:
publish_on_npm [True]: False
install_dependencies [True]: True
use_async
False
use_async is set to False, your component will not be lazy loaded and fragments will not be created.
Executing: c:\program files\python37\python.exe -m venv venv
'c:\program' is not recognized as an internal or external command,
operable program or batch file.
post_gen_project command failed: c:\program files\python37\python.exe -m venv venv

        venv creation failed.
        Make sure you have installed virtualenv on Python 2.

ERROR: Stopping generation because post_gen_project hook script didn't exit successfully
Hook script failed (exit status: 1)

I worked around this by running the venv commands and remaining calls in post_gen_project.py manually, but it'd be better if it worked.

Looks like #23 is a similar but much older issue.

Lingua principale
Python
Stelle
295
Fork
196
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di plotly/dash-component-boilerplate

Tutte le issue di plotly/dash-component-boilerplate

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.