Skip to content

venv problem with python3.6 and git-bash on win10 #939

@LanceLovereading

Description

@LanceLovereading

Environment data

  • VS Code version: 1.20.1(latest version on 2018-03-04)
  • Python Extension version: 2018.1 (01 Feb 2018)
  • Python Version: 3.6.3 v3.6.3:2c5fed8
  • OS and version: Win10

Actual behavior

backward slash omit in path

Expected behavior

path name contains backward slash

Steps to reproduce:

I'm using win10 + vscode + python3.6 + venv + git-bash.

When I right click in editor and select "Run Python file in terminal", it shows the following:
$ source c:\Documents\Work_folder\venv\Scripts\activate
bash: c:DocumentsWork_foldervenvScriptsactivate: No such file or directory

All the backward slash in path disappear when the bash try to execute the file.

I try this on my other computer, it work as expected, the result is following:
$ source "c:\Documents\Work folder\venv\Scripts\activate"

I realized that the only difference is that I use "Work folder" as folder name rather than "Work_folder". It seems if the path of venv folder do not contain any space, it will omit the double quotation marks, and eventually lead to this bug.

Any one have any idea?

Logs

With out space in path name:

User@PC MINGW64 /c/Documents/Work_folder
$ source c:\Documents\Work_folder\venv\Scripts\activate
bash: c:DocumentsWork_foldervenvScriptsactivate: No such file or directory

With space in path name:

User@PC MINGW64 /c/Documents/Work folder
$ source "c:\Documents\Work folder\venv\Scripts\activate"

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