Skip to content
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

(🐞) deactivate-ing a poetry shell doesn't work (on windows?) #4993

Closed
3 tasks done
KotlinIsland opened this issue Jan 6, 2022 · 2 comments · Fixed by #5053
Closed
3 tasks done

(🐞) deactivate-ing a poetry shell doesn't work (on windows?) #4993

KotlinIsland opened this issue Jan 6, 2022 · 2 comments · Fixed by #5053
Labels
kind/bug Something isn't working as expected

Comments

@KotlinIsland
Copy link
Contributor

KotlinIsland commented Jan 6, 2022

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: Windows 10
  • Poetry version: Poetry (version 1.2.0a2)
  • Link of a Gist with the contents of your pyproject.toml file:
[tool.poetry]
name = "test"
version = "1"
description = "test"
authors = []

Issue

When I am in a shell created by poetry shell the deactivate command doesn't deactivate the env.

To deactivate the virtual environment without leaving the shell use deactivate.
- https://python-poetry.org/docs/basic-usage#activating-the-virtual-environment

> poetry shell
Spawning shell within C:\Users\amongus\AppData\Local\pypoetry\Cache\virtualenvs\test-O3eWbxRl-py3.10
> (Get-Command python).Path
C:\Users\amongus\AppData\Local\pypoetry\Cache\virtualenvs\test-O3eWbxRl-py3.10\Scripts\python.exe
> deactivate
> (Get-Command python).Path
C:\Users\amongus\AppData\Local\pypoetry\Cache\virtualenvs\test-O3eWbxRl-py3.10\Scripts\python.exe
> exit
> (Get-Command python).Path
C:\Users\amongus\AppData\Local\Programs\Python\Python311\python.exe
@KotlinIsland KotlinIsland added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Jan 6, 2022
@KotlinIsland KotlinIsland changed the title deactivate-ing a poetry shell doesn't work (on windows?) (🐞) deactivate-ing a poetry shell doesn't work (on windows?) Jan 6, 2022
@abn abn removed the status/triage This issue needs to be triaged label Mar 3, 2022
@coconutattitude
Copy link

I also have this error, when I run which python it gives me the path to virtual environment and when I run "deactivate" I get "deactivate: command not found"

Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants