Skip to content

Commit 53733fa

Browse files
authored
Merge pull request #172 from CellProfiler/mccruz07-patch-2
Update Installation_instructions_for_CellProfiler_M1.md
2 parents be17ca5 + 201272e commit 53733fa

1 file changed

Lines changed: 80 additions & 47 deletions

File tree

Instructions/Installation_instructions_for_CellProfiler_M1.md renamed to Instructions/Installation_instructions_M1_CellProfiler_CellPose_Stardist.md

Lines changed: 80 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Installation instructions for CellProfiler + plugins using a conda environment on Macs using the new Apple M1/2 processor.
1+
Installation instructions for CellProfiler, CellProfiler plugins, CellPose and StarDist in a conda environment on Apple silicon.
22

33
1. **Install brew**
44
```
@@ -15,18 +15,18 @@
1515
brew install java
1616
```
1717
18-
4. **For the system Java wrappers to find this JDK, symlink it with**
18+
4. **For the system Java wrappers to find this JDK and symlink it**
1919
```
2020
sudo ln -sfn /opt/homebrew/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk
2121
```
2222
23-
5. **Set version in zshrc**
23+
5. **Set version in .zshrc**
2424
```
2525
echo export JAVA_HOME=$(/usr/libexec/java_home -v 1.8) >> ~/.zshrc
2626
source ~/.zshrc
2727
```
2828
29-
6. **Brew install the packages req**
29+
6. **Brew install package requirements**
3030
```
3131
brew install freetype mysql git
3232
```
@@ -41,52 +41,86 @@
4141
brew install hdf5@1.12
4242
```
4343
44-
9. Make sure to get the version directory correct for the version installed. Find with `ls /opt/homebrew/Cellar/hdf5/`
44+
9. **Make sure to get the version directory correct for the version installed. Find with `ls /opt/homebrew/Cellar/hdf5/`**
4545
```
4646
export HDF5_DIR=/opt/homebrew/Cellar/hdf5/1.12.1_1/
4747
```
48-
10. **Create a folder and download cellprofiler, cellprofiler-core, and cellprofiler-plugins**
48+
10. **Create a folder and download cellprofiler-plugins**
4949
5050
```
5151
mkdir cp_plugins
5252
cd cp_plugins
53-
git clone https://github.com/CellProfiler/core
54-
git clone https://github.com/CellProfiler/CellProfiler
5553
git clone https://github.com/CellProfiler/CellProfiler-plugins
5654
```
5755
58-
11. **Modify the **setup.py** in the cloned CellProfiler repo.**
59-
60-
Comment out cellprofiler-core and wxpython from the **install_requires** section, since we are installing our own versions:
61-
62-
```
63-
...
64-
"boto3>=1.12.28",
65-
# "cellprofiler-core==4.2.1",
66-
"centrosome==1.2.0",
67-
...
68-
"six",
69-
# "wxPython==4.1.0",
70-
```
71-
72-
12. **Download and install miniconda**
56+
11. **Download and install miniconda**
7357
7458
```
7559
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh -O ~/miniconda.sh
7660
```
7761
7862
79-
16. **Create a conda environment using the cellprofiler_plugins_macM1.yml file**
63+
12. **Create a conda `.yml` file**
64+
In a text editor, paste the following test and save it as `cellprofiler_plugins_macM1.yml`:
65+
```
66+
name: cpcellpose
67+
68+
channels:
69+
- conda-forge
70+
- anaconda
71+
- bioconda
72+
- defaults
73+
- apple
74+
75+
dependencies:
76+
- python=3.8
77+
- pip
78+
- h5py
79+
- mysqlclient
80+
- imagecodecs
81+
- python.app
82+
- pandas
83+
- pip:
84+
- cellpose
85+
- attrdict
86+
- sip==5.5.0
87+
- boto3>=1.12.28
88+
- cellprofiler-core
89+
- centrosome==1.2.1
90+
- docutils==0.15.2
91+
- h5py~=3.6.0
92+
- imageio>=2.5
93+
- inflect>=2.1
94+
- Jinja2>=2.11.2
95+
- joblib>=0.13
96+
- mahotas>=1.4
97+
- matplotlib==3.1.3
98+
- mysqlclient==1.4.6
99+
- numpy>=1.20.1
100+
- Pillow>=7.1.0
101+
- prokaryote==2.4.4
102+
- python-bioformats==4.0.6
103+
- python-javabridge==4.0.3
104+
- pyzmq~=22.3
105+
- sentry-sdk==0.18.0
106+
- requests>=2.22
107+
- scikit-image>=0.17.2
108+
- scikit-learn>=0.20
109+
- scipy>=1.4.1
110+
- six
111+
- tifffile<2022.4.22
112+
- wxPython==4.2.0
113+
```
114+
115+
116+
13. **Create a conda environment using the cellprofiler_plugins_macM1.yml file**
80117
81118
At this stage, your folder/file structure should look like this:
82119
83120
```
84121
├── cp_plugins
85-
   ├── CellProfiler/
86122
   ├── CellProfiler-plugins
87-
   ├── core
88123
   └── cellprofiler_plugins_macM1.yml
89-
90124
```
91125
92126
In the terminal, make sure you are in the `cp_plugins` folder mentioned above.
@@ -95,34 +129,21 @@
95129
conda env create -n cp_plugins --file cellprofiler_plugins_macM1.yml
96130
```
97131
98-
17. **Activate the conda environment**
132+
14. **Activate the conda environment**
99133
100134
```
101135
conda activate cp_plugins
102136
```
103137
104-
18. **Install Cellprofiler core and cellprofiler**
138+
15. **Install Cellprofiler core and cellprofiler**
105139
106-
In the terminal with your environment activate, navigate to the folder where you download the softwares and enter:
140+
In the terminal with your environment activate, navigate to the folder where you download the software and enter:
107141
108142
```
109-
pip install ./core
110-
pip install ./CellProfiler
111-
```
112-
113-
19. **Resolving dependencies conflits**
114-
115-
In the terminal with your environment activate, enter:
116-
```
117-
pip uninstall -y centrosome python-javabridge
118-
pip install --no-cache-dir --no-deps --no-build-isolation python-javabridge centrosome
119-
pip uninstall matplotlib -y
120-
pip install matplotlib==3.2
121-
pip uninstall mahotas -y
122-
pip install mahotas
143+
pip install cellprofiler --no-deps
123144
```
124145
125-
20. **Install other packages for other plugins (just for runStardist)**
146+
16. **Install other packages for other plugins (just for runStardist)**
126147
127148
In the terminal with your environment activate, enter:
128149
```
@@ -131,15 +152,15 @@
131152
pip install stardist csbdeep --no-deps
132153
```
133154
134-
21. **Open CellProfiler**
155+
17. **Open CellProfiler**
135156
136157
Execute this command from within the downloaded CellProfiler repo (get there with `cd CellProfiler`)
137158
138159
```
139160
pythonw -m cellprofiler
140161
```
141162
142-
22. **Connect CellProfiler with the plugins folder**
163+
18. **Connect CellProfiler with the plugins folder**
143164
144165
With your environment active, type pythonw -m cellprofiler in terminal to open CellProfiler if it is not open already.
145166
@@ -150,6 +171,18 @@
150171
*Close CellProfiler and reopen it by typing pythonw -m cellprofiler on the command line
151172
152173
174+
### Resolving dependencies conflits
175+
176+
In the terminal with your environment activate, enter:
177+
```
178+
pip uninstall -y centrosome python-javabridge
179+
pip install --no-cache-dir --no-deps --no-build-isolation python-javabridge centrosome
180+
pip uninstall matplotlib -y
181+
pip install matplotlib==3.2
182+
pip uninstall mahotas -y
183+
pip install mahotas
184+
```
185+
153186
### Test your installation
154187
155188
Add a module to your pipeline by hitting the **+** button in the pipeline panel (bottom left)

0 commit comments

Comments
 (0)