Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation fails via pip (macOS) #5

Closed
Spaak opened this issue Dec 1, 2023 · 3 comments
Closed

Installation fails via pip (macOS) #5

Spaak opened this issue Dec 1, 2023 · 3 comments

Comments

@Spaak
Copy link

Spaak commented Dec 1, 2023

Hi, I'm a reviewer for JOSS and am trying to install mcglm via pip (see review thread here openjournals/joss-reviews#6037).

To emulate a typical (using conda), yet still clean (fresh environment), setup, I went:

conda create -n reviewmcglm
conda activate reviewmcglm
conda install python=3.9
conda install patsy matplotlib statsmodels scipy numpy pandas seaborn

which all went fine. Note that I installed the dependencies here already via conda (the 'default' versions).

Then I went:

pip install mcglm

which resulted in several errors (see below), which appear to be related to pip trying to compile numpy and failing. This is not something I've encountered before (and have used numpy on many occasions in many different settings), so I suspect it's due to something strange in the dependencies and/or the relation to my machine (an M1 (ARM) mac). I did notice that in mcglm's dependencies you specify exact versions of libraries, rather than accepted ranges. This I suspect is in general undesirable, and installing mcglm should be possible in a typical conda setup like I showed above. A fix here would be appreciated so I can install and continue to review :) (I'm deliberately not installing via git pull since installation is part of the review.)

Full output of failing pip install

@Spaak
Copy link
Author

Spaak commented Dec 1, 2023

I get the same (or similar) errors if I just create a clean conda env, install only python in it (and dependencies, including pip), and then do pip install mcglm, so without first installing any further dependencies via conda.

@jeancmaia
Copy link
Owner

Hey, Spaak. Thank you for reaching out, and sorry for this annoying setback. I have overhauled the library, which looks correct at the moment. Check out the logs:

conda create -n reviewmcglm1
source activate reviewmcglm1
pip install mcglm
Collecting mcglm
  Downloading mcglm-0.2.2-py3-none-any.whl (23 kB)
Collecting numpy<2.0,>=1.25
  (18.2 MB)
     |████████████████████████████████| 18.2 MB 1.4 MB/s 
Collecting pandas<2.0.0,>=1.3.3
(12.2 MB)
     |████████████████████████████████| 12.2 MB 56 kB/s 
Collecting matplotlib<4.0.0,>=3.5.2
 (11.6 MB)
     |████████████████████████████████| 11.6 MB 1.9 MB/s 
Collecting statsmodels<0.14.0,>=0.13.2
 (9.9 MB)
Collecting patsy<0.6.0,>=0.5.2
(233 kB)
     |████████████████████████████████| 233 kB 5.0 MB/s 
conda create -n reviewmcglm2
source activate reviewmcglm2
pip install patsy matplotlib statsmodels pandas numpy
pip install mcglm

To fix it, I have weeded out unnecessary requirements and polished all library version specifications. Could you try it out again? Thank you so much.

@Spaak
Copy link
Author

Spaak commented Dec 7, 2023

Fixed 🎉

@Spaak Spaak closed this as completed Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants