Python
If the Python environment become too big or too messy, we will always suggest you to use “Virtual environment” instead, which you would benefit with it by:
To do so, you may just simply install it by the command:
python -m pip install --user virtualenv
Do see the quick manual, you can view it by:
python -m virtualenv –help
Now you can create a new virtual environment, for example, create one called venv under /mnt/huge_store by:
python -m virtualenv /mnt/huge_store/venv
The virual envrioment will be seen as folder only, you can always copy it to any where else, and remove it by simply delete the folder.
It will create one under the folder “/mnt/huge_store/venv”, where your virual environment installed. Then once you want to work on the virtual environment, simply type:
source /mnt/huge_store/venv/bin/active
Then you will see your bash shell changed as (venv)(bash) username@hostname to notice you where you are now working on. You can alias this command, or study with virualenvwrapper if you really want to work it as a shorten command for your future convenient.
For Virualenv Doc: https://virtualenv.pypa.io/
For Virualenvwrapper Doc: https://virtualenvwrapper.readthedocs.io/
This will also work for conda and jupyter with the same method or concept.
Here is the simple guides to do so.
For conda v-env Doc: https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html
For Jupyter v-env Doc: https://queirozf.com/entries/jupyter-kernels-how-to-add-change-remove