Basic python setup
This page may be very obvious for some, but very useful for others. We provide a set of instructions to set up python in a way that makes sense for developing plugins (or other projects). The following explanation is just one way to do it, and there are many ways, which may be better based on your specific needs and preferences
Let’s start by downloading python and a package manager. Even if you already have python installed on your system, this is still a good idea. Download and install miniconda, a small version of Anaconda, a package manager for python.
Now that we have conda set up, we can create an environment. An environment allows us to isolate all the dependencies for a project. We can activate the environment when we are working on the project, and switch to another environment when we are working on a another project. Lets create an environment called my_env
.
conda create --name my_env --python=3.8
Now, we can activate the environment using
conda activate my_env
We can deactivate using
conda deactivate
If we now run pip install <sompackage>
with the environment activated, and it will be installed in the environment
Notebooks
Many data science projects use notebooks for exploration, a basic setup for notebooks is
pip install jupyter
Also, to be able to select your environment from a notebook
conda install nb_conda_kernels