Error installing Empress with pip

Hi,

I am trying to install Empress as a standalone package on macOS using

pip install empress

I am in a conda environment (empress-env) with Python 3.13, and numpy is already installed.

The installation fails when building the iow dependency and shows:

ModuleNotFoundError: No module named 'numpy'
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.

How can I fix this so I can complete the installation?

Thanks,

Anna

Hey @anna.abbey,

Is there a reason you’re trying to install empress via pip instead of conda? Since you’re in a conda environment, you should be able to install empress via conda, which will ensure all transitive dependencies are included in the install (and compatible with the rest of the packages in that environment).

I’d try running `conda install -c conda-forge -c bioconda empress` and see if that’s successful. If you still run into issues, please share the full traceback from your command and we can take a closer look.

Cheers :lizard:

Hi! Empress is not currently available on conda, so for now the recommended way to install it is through pip. If you are in a conda environment, you can use the version of pip that was installed for this conda environment to install Empress.

A downside of using pip instead of conda is that this sometimes requires two installation steps -- some packages (including Empress' iow dependency) require numpy to already be installed before iow can be installed through pip.

So, long story short, the following commands should allow you to install Empress:

pip install cython "numpy < 2"
pip install empress

I reproduced the No module named ‘numpy’ error from running pip install empress in a Python 3.13 environment without numpy installed, and verified that installing numpy first fixed the problem and allowed me to install Empress into this environment.

3 Likes