Issue
I have Ubuntu with already installed several Pythons:
/usr/bin/python2.7: Python 2.7.5
/usr/local/bin/python3.6: Python 3.6.10
/usr/local/bin/python3.6m: Python 3.6.10
All of them have no jupyter
package.
So I have default commands pip, pip3, pip3.6, python, python3, python3.6
Also I have venv
- virtual environment with jupyter
installed.
I activate it using command:
source /home/me/venv/bin/activate
But python
command still using python2, python3
still use default python3.
I can't run python from venv and can't run jupyter notebook
.
How to run python from env and how to start jupyter notebook?
I'm thinking about to rewrite alias for python link or maybe create new one, but don't know how to...
I can run go this way: cd home/me/venv/bin ./python3
and here runs right python version (from venv) and i can import jupyter in interpreter. But still can't run jupyter notebook
in cmd
Solution
You can use absolute or relative paths and the python -m MODULE
syntax to be explicit about which python interpreter you want to use.
/home/me/venv/bin/python -m pip install notebook
/home/me/venv/bin/python -m jupyter notebook
I do not know why the activate
script is not working for you. It should prepend your venv bin
folder to the PATH
so the venv python and other executables are found before other executables on your system.
Answered By - jakub
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.