-
Notifications
You must be signed in to change notification settings - Fork 7
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
Issue installing ffnet with python 3.12 #10
Comments
Hi! Thanks for reporting! I pushed a solution with custom setuptools commands. Numpy (with f2py), meson and meson-python must be available at installation time. Does this work for you? |
Ooh. Thanks! I'll let you know tomorrow...once I figure out how to install meson on the cluster. 😄 |
meson is pip installable... |
Good news, it installs! Bad news, I think more changes are needed underneath. When I try to load it:
I think these lines: Lines 16 to 17 in 67279ab
need to become: from numpy import zeros, ones, sqrt, ndarray, array
from scipy import optimize If I do that, the README example works: $ python3 ffnet_example.py
Feed-forward neural network:
inputs: 2
hiddens: 2
outputs: 1
connections and biases: 9
Testing results for 4 testing cases:
OUTPUT 1 (node nr 5):
Targets vs. outputs:
1 1.000000 1.000000
2 0.000000 0.500000
3 0.000000 0.000001
4 1.000000 0.499999
Regression line parameters:
slope = 0.499999
intercept = 0.250000
r-value = 0.707106
p-value = 0.292894
slope stderr = 0.353553
estim. stderr = 0.353553 (or, I guess, doesn't crash? Not sure what the answer should be). That said, it's possible my suggested changes might need to be protected with try/except? Not sure when the bits moved from scipy to numpy... |
Change must be introduced in >scipy-1.10... Nevertheless, I introduced your changes, without try/except, this always should be written so :) |
@mrkwjc Things seem to be working well for me now! Thanks! I'll close this. |
I recently tried to install ffnet from this repo and I got:
If I try this command with python3.11 I see:
and with python3.12:
As the message says, it looks like
numpy.distutils
is now gone and they recommend looking at:https://numpy.org/devdocs/reference/distutils_status_migration.html
and unfortunately it looks like
setuptools
does not have Fortran support, so this might mean a move to meson. I see many people having to do this on GitHub (see scipy/scipy#13615). If I had a choice, I'd prefer CMake if only because I don't think meson is installed on any of my machines (but maybe with pip this doesn't matter?). Though looking at things like scikit-fmm/scikit-fmm#78 (comment), maybe meson is "winning"...The text was updated successfully, but these errors were encountered: