Skip to content

virtualenv dont work if file "C:\Program" was created #2985

@kuzyara

Description

@kuzyara

Issue

  1. install python to %ProgramFiles%
  2. create file C:\Program
  3. type virtualenv venv in cmd
  4. type call venv\Scripts\activate
  5. type python

Get error: Unable to create process using 'c:\program files\python39\python.exe'

screen:
Image

Environment

Provide at least:

  • OS: windows
  • Shell: cmd
  • Python version and path: 3.9 in c:\program files\python

Output of the virtual environment creation

C:\Users\Kuznetsov_NA>virtualenv venv
created virtual environment CPython3.9.2.final.0-64 in 318ms
  creator CPython3Windows(dest=C:\Users\Kuznetsov_NA\venv, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=C:\Users\Kuznetsov_NA\AppData\Local\pypa\virtualenv)
    added seed packages: pip==25.2, setuptools==80.9.0, wheel==0.45.1
  activators BashActivator,BatchActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator

C:\Users\Kuznetsov_NA>call venv\Scripts\activate

(venv) C:\Users\Kuznetsov_NA>python
Unable to create process using 'c:\program files\python39\python.exe'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions