23
loading...
This website collects cookies to deliver better user experience
apt
package index and then download and install the packages:sudo apt update
sudo apt install python3-pip python3-dev
sudo -H pip3 install --upgrade pip
sudo -H pip3 install virtualenv
-H
flag ensures that the security policy sets the home
environment variable to the home directory of the target user.virtualenv
installed, we can start forming our environment. Create and move into a directory where we can keep our project files.mkdir ~/ml_projects
cd ~/ml_projects
user@pc:~/ml_projects$ virtualenv houseprices_env
source houseprices_env/bin/activate
Once the virtual environment is activated, use pip
instead of pip3
, even if you are using Python 3. The virtual environment’s copy of the tool is always named pip
, regardless of the Python version.
(houseprices_env) user@pc:~/ml_projects$ pip install jupyter
(houseprices_env) user@pc:~/ml_projects$ jupyter notebook