Requesting Python packages at CBS

Follow the procedure outlined below to get Python packages installed in your account in the external environment at CBS.

In the instructions below, replace 0000 with the code of your project at CBS.

  1. Install Mambaforge

  2. Open the Miniforge Prompt

  3. Create an environment for your package.

    conda create -n 0000
    conda activate 0000
  4. Install pip

    conda install pip
  5. Install all the packages with the pip command. Do not use conda install to install packages.

    pip install packagename
  6. Export the environment with pip. Potentially, you could use the cd command to go to the preferred directory to save the txt file in, or you could make the path of environment0000.txt an absolute one, such as D:\Users\WillisB\0000\environment0000.txt. If you want to navigate to another drive in the shell, such as ‘D:’, type D:.

    pip freeze > environment0000.txt
  7. Test the file containing all the packages and dependencies locally by removing the environment, reinstating it, and installing all the packages through the file you just generated.

    conda deactivate
    conda remove -n 0000 --all 
    conda create -n 0000 
    conda activate 0000 
    conda install pip 
    pip install environment0000.txt
  8. Test the Python environment

  9. Send the generated environment0000.txt to CBS.