Closed iaindillingham closed 1 month ago
I can't replicate this - can you detail steps to reproduce?
Typo in now fixed in this commit - venv now activates once the python extension has activated
I've started a Codespace from the commit you've linked to above. The Python venv isn't activated in VS Code's Terminal, as shown in the screenshot below:
What's extensiondisable doing? Is this codespace in a browser or connected to from locally installed vs code?
In browser is working for me
The terminal that starts upon codespace startup (the one that starts rstudio server) shows this message for me
Any terminals manually created have the venv activated.
Is there anything in the output/python pane? I wonder if your local extensions/config are interfering with the codespaces config?
I think there's some weird interactions with local extensions/settings when opening a codespace in VS code rather than in a browser. In any case, it can take a while for the Python extension to activate. We could add a venv activation statement to the postAttachCommand
following the start of RStudio Server such that the already-open terminal immediately has an activated venv
Some further observations:
.py
fileonAttach
(to start rstudio) which is before extension activation and thus doesn't have the venv activatedAlso:
package.json
defines its startup events, and in the case of the Python one it doesn't have application startup as one of themTherefore:
I propose we add a venv activation statement to the rstudio
user's .bashrc
as part of the Dockerfile
This means tools such as
ipython
andpytest
aren't available. The user can run:However, the user would need to know where the venv was located and what a venv was.