Skip to content

Commit 22090a3

Browse files
Update Python installation (#1145)
* python install update * change version to 3.11 * fix oopsi * remove distutils * change description --------- Co-authored-by: Maxime Mulder <maxime.mulder@mcgill.ca>
1 parent cbbbdc6 commit 22090a3

3 files changed

Lines changed: 29 additions & 31 deletions

File tree

.github/workflows/flake8_python_linter.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ name: Flake8 Linter
77
on: pull_request
88

99
jobs:
10-
10+
1111
flake8-lint:
1212
runs-on: ubuntu-latest
13-
13+
1414
steps:
1515
- name: Check out source repository
1616
uses: actions/checkout@v2
17-
17+
1818
- name: Set up Python environment
19-
uses: actions/setup-python@v2
19+
uses: actions/setup-python@v5
2020
with:
21-
python-version: "3.8"
22-
21+
python-version: "3.11"
22+
2323
- name: Flake8 Lint
2424
uses: reviewdog/action-flake8@v3
2525
with:

README.md

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@ This Readme covers release 26.0.* of the LORIS Imaging Insertion Pipeline for Ub
33
This repo accompanies the [LORIS neuroimaging data platform main repo](https://github.com/aces/Loris/releases)</b>, release 24.1.*.<br>
44
For documentation and detailed setup information, please see the [LORIS-MRI documentation](docs/) for your installed version</b>.
55

6-
This repo can be installed on the same VM as the main LORIS codebase, or on a different machine such as a designated fileserver where large imaging filesets are to be stored.
6+
This repo can be installed on the same VM as the main LORIS codebase, or on a different machine such as a designated fileserver where large imaging filesets are to be stored.
77

88
# System Requirements
99

1010
* Perl
11-
* Python 3 with pip3 and virtualenv (step 2 below)
11+
* Python 3.11 with pip3 and venv (step 2 below)
1212
* MINC toolkit (step 3 below)
1313
* DICOM toolkit (step 4 below)
1414
* tpcclib (for HRRT PET only) (step 5 below)
1515

16-
On <u>Ubuntu</u>, DICOM toolkit will be installed by the imaging install script (step 4 below). This script will _apt-get install dcmtk_.
16+
On <u>Ubuntu</u>, DICOM toolkit will be installed by the imaging install script (step 4 below). This script will _apt-get install dcmtk_.
1717

1818
For <u>CentOS</u>: The [LORIS wiki](https://github.com/aces/Loris/wiki/Imaging-Database) Imaging setup page (see Section 1, installing codebase) includes links to older transcripts for [CentOS installation](https://github.com/aces/Loris/wiki/CentOS-Imaging-installation-transcript) and notes on dependencies including [DICOM toolkit](https://github.com/aces/Loris/wiki/CentOS-Imaging-installation-transcript#7-install-dicom-toolkit).
1919

2020
The following installation should be run by the `$lorisadmin` user. `sudo` permission is required.
21-
See [aces/Loris](https://github.com/aces/loris) README.md for further information.
21+
See [aces/Loris](https://github.com/aces/loris) README.md for further information.
2222

2323
# Dependencies
2424

@@ -54,21 +54,19 @@ sudo chown -R lorisadmin:lorisadmin /opt/$projectname
5454
cd /opt/$projectname/bin
5555
```
5656

57-
Get the code: Download the latest release from the
58-
[releases page](https://github.com/aces/Loris-MRI/releases)
57+
Get the code: Download the latest release from the
58+
[releases page](https://github.com/aces/Loris-MRI/releases)
5959
and extract it to `/opt/$projectname/bin/mri`
6060

61-
#### 2. Install Python 3 with `pip` and `virtualenv`
61+
#### 2. Install Python 3.11 with `pip` and `venv`
6262

6363
```bash
64-
sudo apt install python3
65-
sudo apt install python3-dev
64+
sudo apt install python3.11 python3.11-dev python3.11-venv
6665
sudo apt install python3-pip
6766
sudo apt install libmysqlclient-dev
68-
sudo apt install virtualenv
6967
```
7068

71-
#### 3. Install MINC toolkit from http://bic-mni.github.io/
69+
#### 3. Install MINC toolkit from http://bic-mni.github.io/
7270

7371
- Install MINC dependencies:
7472

@@ -82,7 +80,7 @@ sudo apt-get install libgl1-mesa-glx libglu1-mesa
8280

8381
- Download the MINC pre-compiled package for your operating system from http://bic-mni.github.io/.
8482

85-
- Then install the MINC toolkit package:
83+
- Then install the MINC toolkit package:
8684

8785
```bash
8886
# main minc lib
@@ -112,31 +110,31 @@ sudo dpkg -i beast-library-<version>.deb
112110

113111
#### 4. Run installer to set up directories, configure environment, install Perl libraries and DICOM toolkit:
114112

115-
```bash
113+
```bash
116114
cd /opt/$projectname/bin/mri/install/
117115
bash ./imaging_install.sh
118116
```
119117

120-
You will be asked for the following input:
118+
You will be asked for the following input:
121119

122120
* What is the database name? $dbname
123121
* What is the database host? $dbhost
124122
* What is the MySQL user? $lorisuser [Use the same mysql user from the Loris installation, i.e. _lorisuser_]
125-
* What is the MySQL password?
123+
* What is the MySQL password?
126124
* What is the Linux user which the installation will be based on? $lorisadmin
127125
* What is the project name? $projectname
128-
* What is your email address?
126+
* What is your email address?
129127
* What prod file name would you like to use? default: prod [leave blank]
130128

131-
If the imaging install script reports errors in creating directories
132-
(due to `/data/` mount permissions), review and manually execute
133-
`mkdir/chmod/chown` commands starting at
129+
If the imaging install script reports errors in creating directories
130+
(due to `/data/` mount permissions), review and manually execute
131+
`mkdir/chmod/chown` commands starting at
134132
[imaging_install.sh:L97](https://github.com/aces/Loris-MRI/blob/main/install/imaging_install.sh#L97)
135133

136-
Note: The installer will allow Apache to write to the `/data/` and `/opt/` directories by
137-
adding user `lorisadmin` to the Apache linux group. To ensure this change takes
138-
effect, log out and log back into your terminal session before running the
139-
imaging pipeline. The installer will also set Apache group ownership of certain
134+
Note: The installer will allow Apache to write to the `/data/` and `/opt/` directories by
135+
adding user `lorisadmin` to the Apache linux group. To ensure this change takes
136+
effect, log out and log back into your terminal session before running the
137+
imaging pipeline. The installer will also set Apache group ownership of certain
140138
`/data/` and `/opt/` subdirectories.
141139

142140
#### 5. HRRT PET
@@ -157,7 +155,7 @@ Then source the `.bashrc` file.
157155

158156
**INSTALLATION COMPLETE!**
159157

160-
Please refer to the [Install](docs/02-Install.md) section in the
158+
Please refer to the [Install](docs/02-Install.md) section in the
161159
[LORIS-MRI documentation](docs/) for your installed version for:
162160
- customizations and protocol configurations ([Section 2.2](docs/02-Install.md#configuration)).
163161
- verifying that certain fields were correctly populated by `imaging_install.sh`

install/imaging_install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ echo
115115
echo "Creating loris-mri Python virtualenv in $mridir/python_virtualenvs/loris-mri-python/"
116116
# create a directory in $mridir that will store python 3 virtualenv
117117
sudo -S su $USER -c "mkdir -m 770 -p $mridir/python_virtualenvs/loris-mri-python"
118-
virtualenv $mridir/python_virtualenvs/loris-mri-python -p `which python3`
118+
python3.11 -m venv $mridir/python_virtualenvs/loris-mri-python
119119
source $mridir/python_virtualenvs/loris-mri-python/bin/activate
120120
echo "Installing the Python libraries into the loris-mri virtualenv..."
121121
pip3 install -r "$mridir/python/requirements.txt"

0 commit comments

Comments
 (0)