From a79f7c9cde75b46a0410684198f253ed840a94a0 Mon Sep 17 00:00:00 2001 From: Javier Garcia-Bernardo Date: Tue, 11 Jun 2024 13:54:18 +0200 Subject: [PATCH] Update README.md with new instructirons --- README.md | 43 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 71ddb39..fb23546 100644 --- a/README.md +++ b/README.md @@ -6,17 +6,42 @@ There are a few packages that are installed by default (e.g., pandas, pyreadstat If you need specific versions, you need to email CBS a environment.yml file with your requirements. This repository has a standard environment.yml with most of the tools researchers use. Before sending it, open "environment.yml" and change the number (0000 in the example) for your project number. -You can also create your own environment file locally, where 0000 is your project number: -```sh -conda create -n 0000 -c conda-forge python=3 -conda activate 0000 -conda install jupyter notebook scikit-learn pandas matplotlib seaborn jupyterlab notebook plotly IPython pyreadstat openpyxl dask vaex modin polars pyarrow numpy scipy statsmodels pymc3 eli5 SHAP LIME networkx igraph tensorflow keras pytorch pytorch_geometric -conda env export --from-history > ~/environment.yml -``` -If you require specific versions, you can check `conda env export` and add the versions to the `environment.yml` file. +To create the YML file, you need to create your own environment outside the RA environment, in Python on Windows, using Mambaforge installed in C:\mambaforge. Follow the steps below to generate a text file and send it to us via email as a reply. With the text file, we can make the environment available for you within RA. + + + On your own Windows system in Python, create a new environment named after the project code and activate it. As an example, we use project code 0000. + +a. `conda create –n 0000` + +b. `conda activate 0000` + + Install pip. + `conda install pip` + + Then, install the required packages with pip. + `pip install package_name` + + Export the environment with pip. + `pip freeze > C:\temp\environment0000.txt` + Check that the file does not contain references to local paths (file://). + If it does, use the following command: + pip list --format=freeze > C:\temp\environment0000.txt + + Test the environment by removing and recreating it. + `rd /q /s \envs\0000` + `conda create –n 0000` + `conda activate 0000` + `conda install pip` + `pip install –r C:\temp\environment0000.txt` + Test the Python environment. + + Send the environment text file to us via email. + + + +Note! If you want to use Jupyter Notebook or Spyder, you need to install them in the environment as well. -Once CBS has installed it, you may see a new icon with the right version of Python. If this is not the case, you need to activate the Python environment manually. You can open a `Python Prompt`, and run the following code, where 0000 is your project number: ```sh conda activate 0000.