Shapeworks Installation Problem

I downloaded ShapeWorks-v6.3.2-mac.pkg on my mac and successfully installed ShapeWorks without any problem. But when I tried to install ShapeWorks on a cloud computing platform (I was using AzureML), a problem occurred.

I had to download and unzip ShapeWorks-v6.3.2-linux.tar.gz or ShapeWorks-v6.3.2-mac.zip, enter the directory, and run “source ./install_shapeworks.sh”. The installation process seemed to be fine, but I just could not import ShapeWorks in the jupyter notebook in the conda environment (shapeworks). The message said: ModuleNotFoundError: No module named ‘shapeworks_py’.

(base) $ conda activate shapeworks
(shapeworks) $ python
Python 3.7.8 | packaged by conda-forge | (default, Nov 27 2020, 19:24:58)
[GCC 9.3.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import shapeworks
Traceback (most recent call last):
File “”, line 1, in
File “/anaconda/envs/shapeworks/lib/python3.7/site-packages/shapeworks/init.py”, line 4, in
from shapeworks_py import *
ModuleNotFoundError: No module named ‘shapeworks_py’

It is basically the same as the issue mentioned in a previous post (Shapeworks with Jupyter notebook), but I still have no idea what could be the problem. (I think it has nothing to do with the platform I was using.) I downloaded the latest release and followed the installation instruction, but the shapeworks_py module can still not be detected. Can anyone offer me some help? Many thanks.

Hi, can you try running import shapeworks from python when python in launched from the shapeworks/bin directory? (e.g. the location of shapeworks_py.cpython-39-darwin.so or shapeworks_py.cpython-39-x86_64-linux-gnu.so on linux? The problem may be PYTHONPATH.

Your solution worked for me. Thanks so much!

Ok, that’s good to know. The install_shapeworks.sh script is supposed to have modified the conda environment such that conda activate shapeworks should set up the PYTHONPATH for you. I’m not sure why this doesn’t work in some cases.