Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instructions for creating a conda enviroment with python3.8.8 #181

Merged
merged 3 commits into from
May 31, 2022

Conversation

melhemr
Copy link
Contributor

@melhemr melhemr commented Mar 9, 2022

PR will add instructions for creating a conda environment to ensure python version is 3.8.8

@melhemr melhemr marked this pull request as draft March 9, 2022 17:49
@melhemr melhemr force-pushed the conda_env branch 3 times, most recently from 752d588 to d5e9845 Compare March 9, 2022 18:03
@melhemr
Copy link
Contributor Author

melhemr commented Mar 9, 2022

@AbdulkadirA

The only line I wasn't entirely sure how to deal with this line since I am using a mac:

Prepare environment for PowerShell (Windows 10 or 11)

Assuming conda enviroment with Python version 3.8.8 has been created

**& env/Scripts/Activate.ps1**
python -m pip install --upgrade pip
poetry install

In these instructions, I've outlined it so the users create a conda enviroment, so I'm not sure where or how the & env/Scripts/Activate.ps1 should be implemented for Windows users. Can you let me know?

@ashishsingh18
Copy link
Contributor

@melhemr In my conda env, I usually just do:
python -m pip install -U -e .
poetry install

@ashishsingh18
Copy link
Contributor

It might be clearer if we create 2 separate sections for installation: one using conda and the other using virtual env.

Copy link
Contributor

@AbdulkadirA AbdulkadirA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@melhemr Thanks. I made some suggestions.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@AbdulkadirA AbdulkadirA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And one more comment ..

README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@AbdulkadirA AbdulkadirA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@melhemr Thanks. Please leave the sections on setting up the PIP venv for Windows and Linux as they were and only add a section for conda. You could add the indication of PIP to the exiting section headers, though.

@melhemr
Copy link
Contributor Author

melhemr commented May 26, 2022

@melhemr Thanks. Please leave the sections on setting up the PIP venv for Windows and Linux as they were and only add a section for conda. You could add the indication of PIP to the exiting section headers, though.

Can you clarify what you mean? I did leave the PIP section alone, and added conda sections as we discussed. Windows for example:

### Prepare environment for PowerShell (Windows 10 or 11)
Assuming current working directory is `NiBAx` and containing the source code
cloned from https://github.com/CBICA/NiBAx.git.

Virtual environment
```shell
python -m venv .env
& .env/Scripts/Activate.ps1
python -m pip install --upgrade pip
poetry install
Conda environment (assuming conda environment with Python version 3.8.8 or newer has been created)
```shell
conda activate NiBAx
python -m pip install --upgrade pip
poetry install

Copy link
Contributor

@AbdulkadirA AbdulkadirA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@melhemr I propose a couple of changes to further simplify.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@melhemr melhemr marked this pull request as ready for review May 27, 2022 13:47
@melhemr
Copy link
Contributor Author

melhemr commented May 27, 2022

@AbdulkadirA the changes look good. The only final concern I had is about Ashish's comment above. It seems that using a conda environment with a Windows OS still requires using the command poetry install. I don't know if that's 100% necessary, but if it is, how should we include that in the conda environment section?

Copy link
Contributor

@AbdulkadirA AbdulkadirA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Poetry is generally not required, only to package the toolbox.

README.md Outdated Show resolved Hide resolved
@AbdulkadirA AbdulkadirA merged commit 5f02fa7 into CBICA:main May 31, 2022
@melhemr melhemr deleted the conda_env branch May 31, 2022 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants