Skip to content

In virtual environment wrong version of python is used #7583

Closed
@eudaiman

Description

@eudaiman

Description

In my virtual environment I installed jupyter notebook. But when I tried running it, I discovered that it's using the wrong python.

Reproduce

Create venv. Then install venv jupyter:
python -m pip install jupyter
python -m ipykernel install --name=my-kernel-name --prefix=$VIRTUAL_ENV
Then in jupyter notebook import sys and print sys.version. I warrant you it will not be the one in venv.

Expected behavior

Should be the same version as python -V in terminal.

Context

Using Ubuntu 20.04, everything else is latest version (python, jupyter etc.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions