Closed cianciosa closed 1 year ago
thoughts @smithsp @kalling ?
I would guess that the pygacode
package is not specifying a numpy
dependence, but odd that it was "collected" up above (but maybe not installed yet).
I have tried explicitly setting numpy before omas but it fails in the same manner.
On Oct 6, 2022, at 4:35 AM, Sterling Smith @.**@.>> wrote:
I would guess that the pygacode package is not specifying a numpy dependence, but odd that it was "collected" up above (but maybe not installed yet).
— Reply to this email directly, view it on GitHubhxxps://github.com/gafusion/omas/issues/213#issuecomment-1269586917, or unsubscribehxxps://github.com/notifications/unsubscribe-auth/ADAPYD24EGFFCIVP4ODPLBTWB2FLRANCNFSM6AAAAAAQ53PUSM. You are receiving this because you authored the thread.Message ID: @.***>
@cianciosa can you perhaps try to just install pygacode and see if that has the same issue?
The pygacode dependency is not a hard requirement. It is really there only to allow some of the OMAS examples to run.
@orso82 Trying just
name: omas
dependencies:
- pip
- pip:
- pygacode
Shows the same problem so it looks like it's not an omas problem but a problem in the pygacode
dependency.
Ok. Thanks. @smithsp @kalling could you please look into it ? Independently of that, I should also re-evaluate if omas should really have pygacode as a hard dependency...
Hi, the same problem here, when installing OMAS. The problem is that pygacode
is using (l. 40)
from numpy.distutils.core import setup, Extension
in the setup.py
file. This is being run before other installations. The solution may be found here: https://numpy.org/doc/stable/reference/distutils.html
Thank you @hetsko, for pointing this out.
Hey, it seems that numpy
in pygacode
setup really is required (due to fortran code) so migrating to a standard setuptools.setup
would not be enough here. And the issue of "build-time dependency in python" is somewhat described here:
A quick and perhaps obvious note for anyone else running into this: a simple workaround for now seems to be to install numpy
and omas
sequentially in two different pip or conda calls.
pip install numpy
pip install omas
@hetsko thank you for pointing out the origin of the issue and the associated workaround! I now see the problem, that the setup.py
file of pygacode
requires numpy
to run. Perhaps @smithsp or @kalling have some idea about how to bootstrap the pygacode
install when starting from a clean slate?
I think another workaround is using the conda package instead instead of using the pip section in a conda yaml , since the conda package should have it pre-built.
I pushed something in https://github.com/gafusion/gacode/pull/279
Stale issue message
I'm afraid this is still a problem for pip
, I'm not sure about conda. The fix is to add numpy
as a build requirement (not just an install requirement!) in pyproject.toml
(in pygacode -- that repo is private, which is why I'm making a comment here):
[build-system]
requires = [
"setuptools < 64",
"wheel >= 0.29.0",
"numpy >= 1.20.3",
]
build-backend = "setuptools.build_meta"
This will then let the build tool install numpy before trying to build pygacode.
Is pygacode
used in this package? Outside of setup.py
I couldn't see any uses of it. So the other fix would be to just delete it from the install requirements here :slightly_smiling_face:
Take the simple
.yml
file to define a Conda environment.When building this environment, the pip command to install omas fails when trying to install the pygacode dependency.