Setting Up Environment

It is a better idea to install/use the package in a virtual environment. We recommend Python 3.7 or 3.8 versions. Here are the steps to set up a virtual environment and install the package. In order to install the package, please download the package from Github repository. The package name is tsprocess.

Conda

Here are the steps for running the code with anaconda virtual environment. Please make sure that you have anaconda installed on your system. You can also install miniconda which is the lightweight version of anaconda.

  • Step 1: Create a virtual environment

$ conda create --name your_venv python=3.7

Type ‘y’ (yes) for popup questions.

  • Step 2: Activate the virtual environment

$ conda activate your_venv

Install tsprocess (Step 3 or Step 4)

  • Step 3: Directly from PyPI

You can install the package either directly from PyPI through the following command:

$ pip3 install tsprocess
  • Step 4: Install from Github package in developement mode

You can install the package in a developement mode according to the following commands:

Navigate to the downloaded tsprocess folder and install the package requirements.

$ pip3 install -r requirements.txt

Navigate one folder up and install the package.

$ pip3 install -e tsprocess

That’s it. You should be able to import tsprocess and use it. However, if you want to use the code inside Jupyter Notebook (or Jupyter Lab) please follow the next steps.

  • Step 5: Register the kernel on Jupyter Notebook:

Make sure that you have activated the virtual environment (Please see Step 2). Next, install ipykernel:

$ conda install -c anaconda ipykernel

Type ‘y’ (yes) for popup questions. The last step is adding the kernel into Jupyter Notebook.

$ python3 -m ipykernel install --user --name your_venv_name
  • Step 6: Open your notebook and start processing

In your working directory (any arbitrary directory that you work on your data), open terminal and fire up notebook:

$ jupyter notebook (or jupyter lab)

At the top right corner, there is a button labeled New key. Choose your recently created kernel (in this example: your_venv_name). Choosing a kernel will open a new tab that you can work on.