Skip to content

venv creation broken on Windows with spaces in python pathΒ #140

@pythoro

Description

@pythoro

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions