-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
eclipse-che/che-devfile-registry
#404Labels
area/devfile-registrykind/bugOutline of a bug - must adhere to the bug report template.Outline of a bug - must adhere to the bug report template.new¬eworthyFor new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notesFor new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notesseverity/P1Has a major impact to usage or development of the system.Has a major impact to usage or development of the system.sprint/next
Milestone
Description
Describe the bug
When using a python virtual environment, the vscode-python sidecar cannot activate the venv since it tries to activate it using the source command, which is not available in the current shell (/bin/sh).
Che version
7.29.2
Steps to reproduce
- Create a new workspace using the built-in Python stack.
- Once the workspace is loaded, set up a new venv using the devfile's
set up venvcommand - Change the Python interpreter and select the venv python3 binary under
/projects/.venv/bin/python3 - Open the
hello-world.pyfile and execute it using the green "Play" arrow located at the top-right of the editor - You should see the following error:
$ source /projects/.venv/bin/activate
/bin/sh: 1: source: not found
$ /projects/.venv/bin/python3 /projects/python-hello-world/hello-world.py
Hello, world!
Expected behavior
I should be able to run hello-world.py using the devfile command and also the built-in run button of the editor. But to do so, it needs to activate the venv associated.
Not sure what would be the best solution, but I can see:
- Change the default shell of the sidecar to be
bash, sosourcecan be used - Change the way the venv is activated by using
.instead orsource
Screenshots
Release Notes Text
The default Python image now uses bash as the default shell and venv runs successfully. The startup time of an existing workspace has been significantly reduced for the Python getting started example with an update to persist venv folder.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/devfile-registrykind/bugOutline of a bug - must adhere to the bug report template.Outline of a bug - must adhere to the bug report template.new¬eworthyFor new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notesFor new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notesseverity/P1Has a major impact to usage or development of the system.Has a major impact to usage or development of the system.sprint/next
