Install Python packages with pip

To install Python packages for Mantid with pip, use the appropriate command below.

On Windows: C:\MantidInstall\bin\Scripts\pip install package_name --user

On Linux: /opt/Mantid/bin/mantidpython -m pip install package_name --user

On Mac: /Applications/MantidWorkbench.app/Contents/Frameworks/Python.framework/Versions/3.8/bin/python -m pip install package_name --user

Hi! So Im using the latest version of mantid on MacOs Sonoma 14.1.1 and the /Frameworks/Python.framework/Versions/3.8/bin/python is not located inside MantidWorbench.app/ directory, it is the inside Library/ directory. I might just be dumb and thats how it is supposed to be but I already have pandas installed inside that directory, and I still cant import pandas on Mantid.

Hi Ricky, thanks for getting in touch.

The advise from May 21 is a bit out of date. Can I ask if you are installing mantid using the conda package manager, or the standalone installer? See here for details: Installation — MantidProject landing page documentation.

Note: If you have mantid open whilst you do it, you will likely need to restart it to be able to import the installed module.

If you are using the standalone installer, the python install you want is: /Applications/MantidWorkbench.app/Contents/Resources/bin/python. The command remains the same otherwise.

Our suggested method is to use conda, then to use the conda package manager to install external dependencies into your mantid workbench environment. If your dependencies are only on pip, you can use that to install into the conda environment too, though there is a chance you may see conflicts.