New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Virtualenv in Powershell cannot be activated #1207
Comments
Same issue is happening here as well. Though I used
** Appendix (Just in case that dev team is not using Python) Please find detailed description on venv here. |
The last cmder added some protection from anything overwriting Fix virtualenvIf you use virtualenv set $env will do the current process. Set a user env variable or add Workaround venvA quick test and So it looks like you have two options;
I'll have to have a think how to accommodate virtualenv. Going to leave this issue open I think until an update is in the works. |
We'll see how this python issue 29308 gets on. |
Well I'm impressed. Is that with just the commented out line or what happens after you then run activate? Will you post the results of this please; (this with print the code for prompt()) |
It happens when I open up a new powershell tab and type something. Doesn't seem to have anything to do with virtualenv. Virtualenv now activates normally, however, so it does work. The result of that command is:
|
Had the same problem, but I was able to fix it with just commenting the |
Doh silly me, @malvadeza you are quite correct. Updated the workaround comment to make sense. Looks like venv will get a patch to support I assuming no one is going to miss it. It's only the folder name and cmder already has that path. Unless you're using Even so, removing readonly isn't the end of the world. |
I don't really know how python gets released but I presume this fix will get into 3.6.1 So I'd recommend setting |
I face the same problem. Thanks. I confirm that removing If anyone don't know where it is, go to I just write more detail. |
Just to share my perspective on this, that part of the prompt is not just the same folder name that I have in my prompt. It is the folder name of my Python virtual environment. Everybody knows that, but my point is that when I leave that directory to do something else, it's important to me to see a visual reminder of whatever venv I have activated. This is partly because venv doesn't announce itself when you start Python, and because that virtual env is going to be active if you start Python from anywhere. So kudos to @gluons for the clear and complete explanation and to @malvadeza who first noticed this would work! |
I didn't know that's how venv worked, in that case maybe cmder should keep the environment variable in the path whilst set. |
It would be an easy change, and I'd personally be in favor - although removing the |
On the latest version, when I run the Activate.ps1 script to enable the virtualenv, Cmder throws the following error. Virtualenvs work fine on regular PowerShell.
The text was updated successfully, but these errors were encountered: