-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
What is the purpose of the "poetry shell" command? #5050
Comments
Hello @jrobbins-LiveData,
You are free to use this way of activated the venv or the fin swimmer |
Thank you! I have been configuring I think I'd like to use I think the two functional issues for this use-case are:
The solution at the bottom of that link does work, and I hacked my copy of def execute(self, bin, *args, **kwargs):
kwargs["env"] = self.get_temp_environ(environ=kwargs.get("env"))
# TODO JSR
if WINDOWS:
print(get_console_history_info())
print(set_console_history_info())
print(get_console_history_info())
return real_subprocess.run(["cmd.exe", "/E:ON", "/S", "/k", self._path / "scripts" / "activate.bat"], env=kwargs['env'])
else:
return super(VirtualEnv, self).execute(bin, *args, **kwargs) as a quick proof-of-concept to see if I could address these two functional issues on Windows. It works, although obviously it is hardcoded for my choice of shell as By running I hope this all makes sense. It would be great to improve this aspect of |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I am using Poetry on Windows. While there are other issues open about the command prompt opened by
poetry shell
, I am unclear as to why Poetry needs to create a new shell in the first place? Why isn't it enough toactivate
the virtual environment?What does
poetry shell
do, above and beyond what, e.g.,.venv\scripts\activate
does?Issue
I am using Poetry version 1.1.12 on Windows 10. I think I mostly understand the workflow(s) I need to use, with the exception of the
poetry shell
command. In a new project,poetry shell
both creates the virtual environment and activates it. This is well-described bypoetry shell --help
I understand the need for a virtual environment. As a new poetry user, I was expecting a command to create a virtual environment and then a (possibly different) command to activate the virtual environment. Given that the
shell
created on Windows is really sub-optimal (no special $Prompt to remind me that the venv is active, no doskey command history, etc), it would seem to make sense to offer the two commands I was expecting.Of course, I am new, and likely missing more than concern, so, also, I was hoping for guidance as to what the expected workflow is to get a new project going.
The text was updated successfully, but these errors were encountered: