22# Installs conda environment for building ShapeWorks
33#
44
5- SW_MAJOR_VERSION=6.7
5+ SW_MAJOR_VERSION=6.8
66
77# Set up logging
88INSTALL_LOG=" install_shapeworks_$( date +%Y%m%d_%H%M%S) .log"
@@ -173,7 +173,7 @@ function install_conda() {
173173 if [[ $( uname -s) == " Darwin" ]] && [[ $( uname -m) == " x86_64" ]]; then
174174 # Intel Mac - use older versions with NumPy 1.x
175175 if ! python -m light_the_torch install torch==2.2.2 torchaudio==2.2.2 torchvision==0.17.2; then return 1; fi
176- pip install " numpy<2"
176+ python -m pip install " numpy<2"
177177 else
178178 # Apple Silicon, Linux, Windows - use latest with NumPy 2.x support
179179 if ! python -m light_the_torch install torch==2.8.0 torchaudio==2.8.0 torchvision==0.23.0; then return 1; fi
@@ -183,13 +183,13 @@ function install_conda() {
183183 # open3d needs to be installed differently on each platform so it's not part of python_requirements.txt
184184 OPEN3D_INSTALLED=NO
185185 if [[ " $( uname) " == " Linux" ]]; then
186- if pip install open3d-cpu==0.19.0; then
186+ if python -m pip install open3d-cpu==0.19.0; then
187187 OPEN3D_INSTALLED=YES
188188 else
189189 echo " WARNING: open3d-cpu could not be installed. Network analysis features will not be available."
190190 fi
191191 elif [[ " $( uname) " == " Darwin" ]]; then
192- if pip install open3d==0.19.0; then
192+ if python -m pip install open3d==0.19.0; then
193193 OPEN3D_INSTALLED=YES
194194 if [[ " $( uname -m) " == " arm64" ]]; then
195195 pushd $CONDA_PREFIX /lib/python3.12/site-packages/open3d/cpu
@@ -202,7 +202,7 @@ function install_conda() {
202202 echo " WARNING: open3d could not be installed. Network analysis features will not be available."
203203 fi
204204 else
205- if pip install open3d==0.19.0; then
205+ if python -m pip install open3d==0.19.0; then
206206 OPEN3D_INSTALLED=YES
207207 else
208208 echo " WARNING: open3d could not be installed. Network analysis features will not be available."
@@ -211,9 +211,9 @@ function install_conda() {
211211
212212 for package in DataAugmentationUtilsPackage DatasetUtilsPackage MONAILabelPackage DeepSSMUtilsPackage DocumentationUtilsPackage ShapeCohortGenPackage shapeworks ; do
213213 if [[ -e Python/${package} .tar.gz ]] ; then
214- if ! pip install Python/${package} .tar.gz; then return 1; fi
214+ if ! python -m pip install Python/${package} .tar.gz; then return 1; fi
215215 else
216- if ! pip install Python/${package} ; then return 1; fi
216+ if ! python -m pip install Python/${package} ; then return 1; fi
217217 fi
218218 done
219219
@@ -270,7 +270,7 @@ if install_conda; then
270270 conda list
271271
272272 echo " Pip installed packages:"
273- pip list
273+ python -m pip list
274274
275275 conda clean -t -y
276276
0 commit comments