venv fails to activate due to path name. Can this be changed?

Answered

I have a venv path the goes something like this C:\Users\<userid>\OneDrive - CompanyName\PycharmProjects\project\venv.
When opening terminal, pycharm attempts to activate the venv, but it throws this error:
 

C:/Users/userid/OneDrive : The term 'C:/Users/userid/OneDrive' is not recognized as the name of a cmdlet, function, script file, or operable program.

It appears that it is interpreting the space in the path name as the end. Is there a way to make terminal add quotes to the path name when activating or something? I would remove the space, but this folder is locked by my company. 

 

 

1
3 comments

Hi Miguel. Thank you for the reply. This work around is working for me. Unfortunate that PowerShell is not working with venv. Looks like path just needs some quotes around it. Fortunately, I can use CMD without issues for now. 

Thanks again.

0

same issue 
wasn't there until i updated to 2024.2.1

i prefer using psh to cmd
so if a fix… 

0

Please sign in to leave a comment.