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

macOS: Not able to deactivate after editing the .bashrc file #22304

Closed
aiday-mar opened this issue Oct 24, 2023 · 5 comments
Closed

macOS: Not able to deactivate after editing the .bashrc file #22304

aiday-mar opened this issue Oct 24, 2023 · 5 comments
Assignees
Labels
info-needed Issue requires more information from poster macos triage-needed Needs assignment to the proper sub-team

Comments

@aiday-mar
Copy link

aiday-mar commented Oct 24, 2023

Testing #22288

I was following the steps you mentioned in the TPI. Let me know if I am doing something incorrectly. Here is a gif of what I was doing (contains one incorrect copy paste of the expected output in the terminal):

Screen.Recording.2023-10-24.at.14.39.26.mov

It may be that perhaps I am not following one of the steps correctly?

Note: I tried a second time on a different user data dir, didn't work this time too:

Screen.Recording.2023-10-24.at.14.52.12.mov

I had the following in the Python output:


2023-10-24 14:52:26.918 [info] Experiment 'pythonTerminalEnvVarActivation' is active
2023-10-24 14:52:26.918 [info] Experiment 'pythonPromptNewFormatterExt' is active
2023-10-24 14:52:26.918 [info] Experiment 'pythonPromptNewToolsExt' is active
2023-10-24 14:52:26.918 [info] Experiment 'pythonRecommendTensorboardExt' is active
2023-10-24 14:52:26.918 [info] Experiment 'pythonREPLSmartSend' is active
2023-10-24 14:52:26.918 [info] Experiment 'pythonTestAdapter' is active
2023-10-24 14:52:27.019 [info] Default formatter is set to null for workspace /Users/aiday/Desktop/Test/TestingFiles
2023-10-24 14:52:27.032 [info] Test server listening.
2023-10-24 14:52:27.034 [info] > conda info --json
2023-10-24 14:52:27.517 [info] Found: /usr/bin/python3 --> /usr/bin/python3
2023-10-24 14:52:27.524 [warning] Retry failed, storage update failed for key PYTHON_GLOBAL_STORAGE_KEYS
2023-10-24 14:52:27.524 [warning] Retry failed, storage update failed for key PYTHON_GLOBAL_STORAGE_KEYS
2023-10-24 14:52:27.524 [warning] Retry failed, storage update failed for key PYTHON_GLOBAL_STORAGE_KEYS
2023-10-24 14:52:27.524 [warning] Retry failed, storage update failed for key PYTHON_GLOBAL_STORAGE_KEYS
2023-10-24 14:52:27.524 [warning] Retry failed, storage update failed for key PYTHON_WORKSPACE_STORAGE_KEYS
2023-10-24 14:52:27.524 [warning] Retry failed, storage update failed for key PYTHON_WORKSPACE_STORAGE_KEYS
2023-10-24 14:52:27.524 [warning] Retry failed, storage update failed for key PYTHON_WORKSPACE_STORAGE_KEYS
2023-10-24 14:52:27.532 [info] Found: /usr/local/bin/python3 --> /Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10
2023-10-24 14:52:27.534 [info] Found: /usr/local/bin/python3.10 --> /Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10
2023-10-24 14:52:27.537 [info] > ./.venv/bin/python -I ~/.vscode-insiders/extensions/ms-python.python-2023.19.12971007/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2023.19.12971007/pythonFiles/interpreterInfo.py
2023-10-24 14:52:27.543 [info] Found: /opt/homebrew/bin/python3 --> /opt/homebrew/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/bin/python3.11
2023-10-24 14:52:27.545 [info] Found: /opt/homebrew/bin/python3.10 --> /opt/homebrew/Cellar/[email protected]/3.10.13/Frameworks/Python.framework/Versions/3.10/bin/python3.10
2023-10-24 14:52:27.546 [info] Found: /opt/homebrew/bin/python3.11 --> /opt/homebrew/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/bin/python3.11
2023-10-24 14:52:27.547 [info] Found: /Users/aiday/miniconda3/bin/python --> /Users/aiday/miniconda3/bin/python3.10
2023-10-24 14:52:27.547 [info] Found: /Users/aiday/miniconda3/bin/python3 --> /Users/aiday/miniconda3/bin/python3.10
2023-10-24 14:52:27.548 [info] Found: /Users/aiday/miniconda3/bin/python3.1 --> /Users/aiday/miniconda3/bin/python3.10
2023-10-24 14:52:27.548 [info] Found: /Users/aiday/miniconda3/bin/python3.10 --> /Users/aiday/miniconda3/bin/python3.10
2023-10-24 14:52:27.553 [info] > /usr/bin/python3 -I ~/.vscode-insiders/extensions/ms-python.python-2023.19.12971007/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2023.19.12971007/pythonFiles/interpreterInfo.py
2023-10-24 14:52:27.755 [info] > /usr/local/bin/python3 -I ~/.vscode-insiders/extensions/ms-python.python-2023.19.12971007/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2023.19.12971007/pythonFiles/interpreterInfo.py
2023-10-24 14:52:27.855 [info] > /opt/homebrew/bin/python3 -I ~/.vscode-insiders/extensions/ms-python.python-2023.19.12971007/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2023.19.12971007/pythonFiles/interpreterInfo.py
2023-10-24 14:52:27.924 [info] > /opt/homebrew/bin/python3.10 -I ~/.vscode-insiders/extensions/ms-python.python-2023.19.12971007/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2023.19.12971007/pythonFiles/interpreterInfo.py
2023-10-24 14:52:28.221 [info] > ~/miniconda3/bin/python -I ~/.vscode-insiders/extensions/ms-python.python-2023.19.12971007/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2023.19.12971007/pythonFiles/interpreterInfo.py
2023-10-24 14:52:28.252 [info] > conda config --get auto_activate_base
2023-10-24 14:52:28.354 [info] > ~/miniconda3/envs/test/bin/python -I ~/.vscode-insiders/extensions/ms-python.python-2023.19.12971007/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2023.19.12971007/pythonFiles/interpreterInfo.py
2023-10-24 14:52:28.406 [info] > ~/miniconda3/envs/test_august/bin/python -I ~/.vscode-insiders/extensions/ms-python.python-2023.19.12971007/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2023.19.12971007/pythonFiles/interpreterInfo.py
2023-10-24 14:52:28.481 [info] > ~/miniconda3/envs/testjuly/bin/python -I ~/.vscode-insiders/extensions/ms-python.python-2023.19.12971007/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2023.19.12971007/pythonFiles/interpreterInfo.py
2023-10-24 14:52:28.491 [info] > ~/miniconda3/envs/testjune/bin/python -I ~/.vscode-insiders/extensions/ms-python.python-2023.19.12971007/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2023.19.12971007/pythonFiles/interpreterInfo.py
2023-10-24 14:52:28.559 [info] > ~/miniconda3/envs/testmarch/bin/python -I ~/.vscode-insiders/extensions/ms-python.python-2023.19.12971007/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2023.19.12971007/pythonFiles/interpreterInfo.py
2023-10-24 14:52:28.695 [info] Python interpreter path: ./.venv/bin/python
2023-10-24 14:52:28.710 [warning] Retry failed, storage update failed for key PYTHON_GLOBAL_STORAGE_KEYS
2023-10-24 14:52:28.716 [info] > . ./.venv/bin/activate && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python ~/.vscode-insiders/extensions/ms-python.python-2023.19.12971007/pythonFiles/printEnvVariables.py
2023-10-24 14:52:28.716 [info] shell: bash
2023-10-24 14:52:28.719 [info] > . ./.venv/bin/activate && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python ~/.vscode-insiders/extensions/ms-python.python-2023.19.12971007/pythonFiles/printEnvVariables.py
2023-10-24 14:52:28.719 [info] shell: bash
2023-10-24 14:52:28.725 [info] > ~/miniconda3/bin/python3.10 -I ~/.vscode-insiders/extensions/ms-python.python-2023.19.12971007/pythonFiles/get_output_via_markers.py ~/.vscode-insiders/extensions/ms-python.python-2023.19.12971007/pythonFiles/interpreterInfo.py
2023-10-24 14:52:28.802 [info] > /usr/bin/python3 ~/.vscode-insiders/extensions/ms-python.python-2023.19.12971007/pythonFiles/printEnvVariables.py
2023-10-24 14:52:28.802 [info] shell: bash
2023-10-24 14:52:29.840 [info] Starting Pylance language server.
2023-10-24 14:52:37.052 [info] Selected workspace /Users/aiday/Desktop/Test/TestingFiles for creating virtual environment.
2023-10-24 14:52:37.787 [info] Selected interpreter /Users/aiday/Desktop/Test/TestingFiles/.venv/bin/python for creating virtual environment.
2023-10-24 14:52:37.803 [info] Discover tests for workspace name: TestingFiles - uri: /Users/aiday/Desktop/Test/TestingFiles
2023-10-24 14:53:27.342 [info] Send text to terminal: deactivate

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Oct 24, 2023
@karrtikr
Copy link

karrtikr commented Oct 24, 2023

As I've pointed out here #22288 (comment) this is expected for bash. Although, can you run the echo $SHELL command in bash and see what you get?

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Oct 24, 2023
@karrtikr karrtikr added the macos label Oct 24, 2023
@karrtikr karrtikr changed the title Testing #22288: Not able to deactivate after editing the .bashrc file macOS: Not able to deactivate after editing the .bashrc file Oct 24, 2023
@karrtikr
Copy link

Thanks for providing the GIFs, btw.

@aiday-mar
Copy link
Author

I just ran echo $SHELL, I saw /bin/bash

@github-actions github-actions bot removed the info-needed Issue requires more information from poster label Oct 25, 2023
@aiday-mar
Copy link
Author

Just tried with the zsh terminal, it works correctly. However one thing I noticed is that when I create a new zsh terminal and I type echo $SHELL I also see /bin/bash even though the default profile is set to zsh. Is this expected?

I tested with powershell by installing it on my mac. It works 👍🏻

@karrtikr
Copy link

Doesn't seem like it's expected, but it's an issue with mac itself. For some folks in our team, bash was actually zsh. For you, it seems zsh was actually bash. Not sure what to make of it.

We run echo $SHELL to try to figure out what shell it actually is, and accordingly offer to edit either ~/.bashrc or ~/.zshrc based on response.

Thanks for the detailed testing, appreciate it!

@karrtikr karrtikr closed this as not planned Won't fix, can't repro, duplicate, stale Oct 25, 2023
@github-actions github-actions bot added the info-needed Issue requires more information from poster label Oct 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster macos triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

2 participants