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

conda install of 1.5.1 not detected by pip #2447

Closed
pluflou opened this issue May 17, 2024 · 5 comments · Fixed by #2452
Closed

conda install of 1.5.1 not detected by pip #2447

pluflou opened this issue May 17, 2024 · 5 comments · Fixed by #2452

Comments

@pluflou
Copy link

pluflou commented May 17, 2024

Describe the bug
There is a bug in the packaging of v1.5.1. Pip fails to detect it when installed with conda; it seems to be missing the dist-info directory.

To Reproduce
In a fresh conda environment, install the latest cxvpy:
conda install cvxpy -c conda-forge

Expected behavior
I expect to see cvxpy listed as installed when calling pip list or pip freeze.

Output
cvxpy shows up as UNKNOWN when calling pip list or pip freeze:

(test-pip) smiskov@PC99612 cvxpy % pip list
Package         Version
--------------- -----------
build           1.2.1
clarabel        0.7.1
ecos            2.0.13
numpy           1.26.4
osqp            0.6.3
packaging       24.0
pip             24.0
pyproject_hooks 1.1.0
qdldl           0.1.7.post2
scipy           1.13.0
scs             3.2.4.post1
setuptools      69.5.1
UNKNOWN         1.5.1
wheel           0.43.0

Version

  • OS: macOS 14.4.1 and Ubuntu 22.04.4
  • CVXPY Version: 1.5.1

Additional context
This was working as expected in v1.4.3. We saw this bug when building our conda package that depends on cvxpy. The build fails to pass the pip check test in our conda recipe (see workflow failure here and PR here).

@pluflou
Copy link
Author

pluflou commented May 17, 2024

@phschiele this is in relation to the bug we saw when building spcqe a couple days ago

@phschiele
Copy link
Collaborator

@pluflou I am able to reproduce your output on a fresh code space:

Package    Version                                                                                                                                                                                       
---------- -----------                                                                                                                                                                                   
clarabel   0.7.1                                                                                                                                                                                         
ecos       2.0.13                                                                                                                                                                                        
numpy      1.26.4                                                                                                                                                                                        
osqp       0.6.3                                                                                                                                                                                         
pip        24.0                                                                                                                                                                                          
qdldl      0.1.7.post2                                                                                                                                                                                   
scipy      1.13.0                                                                                                                                                                                        
scs        3.2.4.post1                                                                                                                                                                                   
setuptools 69.2.0                                                                                                                                                                                        
UNKNOWN    1.5.1                                                                                                                                                                                         
wheel      0.43.0   

Installing from PyPI works, though.
@h-vetinari have you seen this behaviour before?

@h-vetinari
Copy link
Contributor

have you seen this behaviour before?

No I haven't...

We didn't change anything about the way cvxpy gets installed between 1.4.3 and 1.5.1 (the stdlib things are unrelated), so at a guess this would be something to do with some potential behaviour changes in pip/setuptools?

I added a test in conda-forge/cvxpy-feedstock#92 and could reproduce the failure. On a hunch, I restricted to pip <24, but that didn't change anything. Note that we're deleting pyproject.toml before installation, because the way it is set up forces installation of

cvxpy/pyproject.toml

Lines 26 to 34 in f098629

[build-system]
requires = [
"oldest-supported-numpy",
"scipy >= 1.1.0",
# 68.1.0 Promoted pyproject.toml's [tool.setuptools] out of beta.
"setuptools>=68.1.0",
"wheel",
"pybind11"
]

which cannot work in conda-forge for various reasons (these packages get installed through conda before the build starts).

However, we've been doing that since a long time, so I don't think this should play a role here.

@h-vetinari
Copy link
Contributor

h-vetinari commented May 23, 2024

@timkpaine found the issue - it's that name="cvxpy" is missing from setup.py (since d8f74ec). In principle, this information is now present in pyproject.toml, but as I had mentioned, we removed that (mostly because it became painful to constantly patch out the build system).

@timkpaine
Copy link
Contributor

It should be safe to include name in both since its obviously not going to change

timkpaine added a commit to timkpaine/cvxpy that referenced this issue May 24, 2024
phschiele pushed a commit that referenced this issue May 28, 2024
…2452)

* Include minimum necessary meta information in setup.py, fixes #2447

* Fixes cvxpy-base

* Fixes spacing

---------

Co-authored-by: Parth Nobel <parthnobel@berkeley.edu>
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

Successfully merging a pull request may close this issue.

4 participants