-1

I am trying to install a program that I need to use for my research, but I am running into issues. The program is called "hmf," and I can sucessfully install it using pip install hmf. However, when I try to import a module, I get an issue: This image shows the error message I get, which is

ImportError: cannot import name 'CAMB' from 'hmf.density_field.transfer_models' (/Users/cammienorton/opt/anaconda3/lib/python3.8/site-packages/hmf/density_field/transfer_models.py)

As per the online suggestion on https://hmf.readthedocs.io/en/latest/installation.html I have tried running

conda install -c conda-forge numpy scipy astropy camb

and I don't get any error messages. Does anyone have any idea what is going on?

UPDATE: I tried pip install CAMB and received the following error message, which says that there was an error while building the wheel.

  • Possibly `pip` does not refer to the Python distribution you are using. You can check the version of `pip` and its path using the command `pip --version` – gofvonx Apr 03 '21 at 17:18
  • @gofvonx I checked this, and ensured that I have the most updated version of pip. I still get the same error messages. – ccalculates Apr 03 '21 at 20:03

1 Answers1

0

CAMB package is not available in you python installation

pip install CAMB

this should fix

ls_da3m0ns
  • 146
  • 5
  • I tried this, and received another error message, that says an error occurred while building wheel for CAMB (setup.py). Any idea as to what this means? – ccalculates Apr 03 '21 at 19:58
  • I have updated the question to include the whole error message. – ccalculates Apr 03 '21 at 20:05
  • i have a quick question are you using mac? if yes then look at this [stackoverflow question link](https://stackoverflow.com/questions/52522565/git-is-not-working-after-macos-update-xcrun-error-invalid-active-developer-pa) if not then maybe this issue on github can help [github issue link](https://github.com/cmbant/CAMB/issues/57) – ls_da3m0ns Apr 04 '21 at 06:52
  • I was using mac, and this worked! Thank you so much! – ccalculates Apr 04 '21 at 17:25