Hello i am reading a ML (Machine learning) book. And i got a bit confused. Currently i am in the part that says "Create the workspace". It actually goes like this: "Next you need to create a workspace directory for your Machine Learning code and datasets.Open a Terminal and type the following commands(after the $ prompts):"
$ export ML_PATH="$HOME/ml" #You can change the path if you prefer
$ mkdir -p $ML_PATH
After that creates an isolated environment and at the end it says: "Now every time you want to activate this enviroment, just open a terminal and type
$ cd $ML_PATH
$ source env/bin/activate
I do so and i works like a charm.But if i open a new terminal it does not work .Could someone explain me what is wrong ?? Thank you in advance! P.S the book is "Hands-On Machine learning with Scikit-Learn & TensorFlow" By O'REILLY and Aurelien Geron
Run the following command in your terminal:
echo "export ML_PATH='$HOME/ml'" >> ~/.bashrc
It will append the required export statement to your .bash_profile file, which is used to create aliases like you need to. Please note that it is >>
, and not >
.
If you want to see the update right now, do:
source ~/.bashrc