Path with parentheses in -p argument results in "was unexpected at this time"
Using:
- Windows 10
- Python 3.6.0
- virtualenvwrapper-win 1.2.5
When I try to use the -p flag to point to a specific Python installation that happens to be in a path with spaces, I get an error:
> mkvirtualenv -p "C:\Program Files (x86)\Python36-32\python.exe" myenv
\Python36-32\python.exe"" was unexpected at this time.
I have tried no quotes, single quotes, and backslash escaping the spaces and parentheses (and other backslashes). It is definitely the correct path, since this works:
> "C:\Program Files (x86)\Python36-32\python.exe"
Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 07:18:10) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
I don't know much about Batch scripting, but I believe this error usually comes up when a ) is interpreted as closing a control structure prematurely.
(Also there seems to be a typo in mkvirtualenv.bat: virualenv_param_options should probably be virtualenv_param_options?)
It looks like it's actually the parenthesis (x86) which is the problem..
Looks like my checkin clobbered some code. I'll rework it tomorrow (central EU timezone here).
Did this ever get fixed? I'm still having this problem
I just installed virtualenvwrapper from pip so I'm pretty sure I have the most up to date version
You should be able to use just -p3.6-32 or similar (same as the py command).