Getting FDC to work cant install scipy
so has anyone managed to get FDC to run..? whilst running = python3 -m pip install -r requirements.txt
python3 generate_FDC_meshes_z_heights.py json_file 0.1 --filter_noise , Im getting errors such as ModuleNotFoundError: No module named 'scipy' . I did the git clone, and it runs, building the mesh with temp .. any help would be appreciated.
37 Replies
correct-apricotOP•2y ago
@mietzekatzi post moved here
Something appears to be broken on your Pi's Python installation and tbh such errors are stupid to debug.
Worst case you break something else, if you start upgrading or installing stuff.
Scipy needs some Fortran tools, which you might be able to get with one of these commands (according to the internet)
But if you tried to run the script on your Windows PC, you'll only need to install Python (from the official website) and do
pip install matplotlib numpy scipy
correct-apricotOP•2y ago
thanks, frustrating that gfortran and build-essential are already installed and latest version
hmm, further evidence that something is broken
if you run
gfortran --version
, is the tool found?correct-apricotOP•2y ago
so if i burnt a new image on my sd.. what files from my install would i need to backup, just printer.cfg ?
One more thing to try:
pip install scipy --no-build-isolation
correct-apricotOP•2y ago
GNU Fortran (Raspbian 10.2.1-6+rpi1) 10.2.1 20210110
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
So it is cleared found
Good question, maybe there is documentation on the RatOS homepage.
I'd backup the whole printer_data directory, to be safe
correct-apricotOP•2y ago
ok just tried pip install scipy --no-build-isolation
standby for the errors
correct-apricotOP•2y ago
pip install meson-python
correct-apricotOP•2y ago
ok just installed that amd now trying the scipy again
... with the --no-build-isolation, yes!
correct-apricotOP•2y ago
yes with that
just waiting at the mo
another idea: uninstall numpy, then reinstall scipy.
pip uninstall numpy
(-> answer with yes)
pip install scipy
(will also hopefully also install a compatible version of numpy)correct-apricotOP•2y ago
so close !
pi@RatOS1:~/FDC $ pip install scipy --no-build-isolation
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting scipy
Using cached scipy-1.11.1.tar.gz (56.0 MB)
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [2 lines of output]
meson-python: error: Could not find ninja version 1.8.2 or newer. [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details. I REALLY appreciate your help BTW 😉
× Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [2 lines of output]
meson-python: error: Could not find ninja version 1.8.2 or newer. [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details. I REALLY appreciate your help BTW 😉
pip install ninja why i absolute hate compiling things from scratch. At the end you have 900 ancient tools on your PC.
correct-apricotOP•2y ago
it's not ending... pip install Cython
correct-apricotOP•2y ago
done -
standby
taking a while
I'm quickly off to wash the car, so I may take longer to respond
correct-apricotOP•2y ago
no worries.. it did have an error of "Program pythran found: NO" , so installled that, just waiting thanks mate
correct-apricotOP•2y ago
pip install pybind11
correct-apricotOP•2y ago
Beat me to it. Im just reinstalling Python 3.7 as that is one of the pre-requisites.. dont think it was installed then try again with the scipy .. this is going to be one messy install at this rate
3.9 should have worked too, i'd rather upgrade to newest version 3.11
correct-apricotOP•2y ago
Ah, one more weird dependency
This isn't a python package now, according to the internet it comes from
sudo apt-get install libopenblas-dev
correct-apricotOP•2y ago
ok installed that, now running scipy, taking forever
I think this has worked !!! Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting scipy
Using cached scipy-1.11.1.tar.gz (56.0 MB)
Preparing metadata (pyproject.toml) ... done
Collecting numpy<1.28.0,>=1.21.6 (from scipy)
Using cached https://www.piwheels.org/simple/numpy/numpy-1.25.0-cp39-cp39-linux_armv7l.whl (12.5 MB)
Building wheels for collected packages: scipy
Building wheel for scipy (pyproject.toml) ... done
Created wheel for scipy: filename=scipy-1.11.1-cp39-cp39-linux_armv7l.whl size=65100320 sha256=9bd02766d423586432a22137698d9f07d7becfd9a6de15a3d684ea98786ebd36
Stored in directory: /home/pi/.cache/pip/wheels/e7/15/e0/4ab00ce22c88d258eec967b9805faa930351f82116be40f983
Successfully built scipy
Installing collected packages: numpy, scipy
Successfully installed numpy-1.25.0 scipy-1.11.1
thanks !!!!!!
correct-apricotOP•2y ago
nearlly ;9
😦
Writing results to file thermal_quant__2023-07-02_18-16-00.json...DONE
==========================
ALL MEASUREMENTS COMPLETE!
==========================
^C
[1]+ Done nohup python3 measure_thermal_behavior.py 0.1 > out.txt
pi@RatOS1:~/FDC $ python3 generate_FDC_meshes_z_heights.py json_file 0.1 --filter_noise
Traceback (most recent call last):
File "/home/pi/FDC/generate_FDC_meshes_z_heights.py", line 393, in <module>
main(sys.argv)
File "/home/pi/FDC/generate_FDC_meshes_z_heights.py", line 328, in main
with open(source_file, "r") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'json_file'
after all measurements complete. I run = python3 generate_FDC_meshes_z_heights.py json_file 0.1 --filter_noise
and then get the error above
correct-apricotOP•2y ago
When I run LS it is showing the JSON
You need to add the actual filename (thermal_quant_blablabla.json) instead of „json_file“. 😛
It tries to open a file called „json_file“, but that doesn’t exist
correct-apricotOP•2y ago
oh ffs, I set bed to even 10,10 .. try again python3 generate_FDC_meshes_z_heights.py thermal_quant__2023-07-02_18-16-00.json 0.1 --filter_noise
Traceback (most recent call last):
File "/home/pi/FDC/generate_FDC_meshes_z_heights.py", line 393, in <module>
main(sys.argv)
File "/home/pi/FDC/generate_FDC_meshes_z_heights.py", line 335, in main
new_meshes = gen_missing_meshes_by_step_interpolated(thermal_data["hot_mesh"], step)
File "/home/pi/FDC/generate_FDC_meshes_z_heights.py", line 187, in gen_missing_meshes_by_step_interpolated
z_meshes_3d, temp_list = convert_meshes_json_to_list(meshes, step)
File "/home/pi/FDC/generate_FDC_meshes_z_heights.py", line 161, in convert_meshes_json_to_list
measurement_points_normalized = normal_mesh_to_zero_middle(measurement["points"], temp)
File "/home/pi/FDC/generate_FDC_meshes_z_heights.py", line 60, in normal_mesh_to_zero_middle
middle_z = get_middle_point_from_mesh(zpoints)
File "/home/pi/FDC/generate_FDC_meshes_z_heights.py", line 46, in get_middle_point_from_mesh
raise Exception("Mesh is supposed to have an odd number of probes! (5,5) (7,7) (9,9) and so on, current probe count (%s, %s)" % (len(zpoints), len(zpoints[0])))
Exception: Mesh is supposed to have an odd number of probes! (5,5) (7,7) (9,9) and so on, current probe count (10, 10)
ok all done
correct-apricotOP•2y ago
I now have this and trying to work out what goes where in my config =