Opened 9 months ago
Last modified 7 months ago
#69362 assigned defect
cantera @2.5.1: ModuleNotFoundError: No module named 'SCons'
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | thomasfiala (Thomas Fiala) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.9.1 |
Keywords: | Cc: | ||
Port: | cantera |
Description
cantera fails to build:
Executing: cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_science_cantera/cantera/work/cantera-2.5.1" && /opt/local/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10 /opt/local/bin/scons build prefix=/opt/local CC=/usr/bin/clang CXX=/usr/bin/clang++ boost_inc_dir=/opt/local/libexec/boost/1.76/include f90_interface=n googletest=system python_cmd=/opt/local/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10 python_package=full python_prefix=/opt/local/Library/Frameworks/Python.framework/Versions/3.10 renamed_shared_libraries=n system_fmt=y system_eigen=y system_yamlcpp=y extra_inc_dirs=/opt/local/include/eigen3:/opt/local/include/libfmt8:/opt/local/include extra_lib_dirs=/opt/local/lib/libfmt8:/opt/local/lib system_sundials=y sundials_include=/opt/local/libexec/sundials5/include sundials_libdir=/opt/local/libexec/sundials5/lib DEBUG: system: cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_science_cantera/cantera/work/cantera-2.5.1" && /opt/local/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10 /opt/local/bin/scons build prefix=/opt/local CC=/usr/bin/clang CXX=/usr/bin/clang++ boost_inc_dir=/opt/local/libexec/boost/1.76/include f90_interface=n googletest=system python_cmd=/opt/local/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10 python_package=full python_prefix=/opt/local/Library/Frameworks/Python.framework/Versions/3.10 renamed_shared_libraries=n system_fmt=y system_eigen=y system_yamlcpp=y extra_inc_dirs=/opt/local/include/eigen3:/opt/local/include/libfmt8:/opt/local/include extra_lib_dirs=/opt/local/lib/libfmt8:/opt/local/lib system_sundials=y sundials_include=/opt/local/libexec/sundials5/include sundials_libdir=/opt/local/libexec/sundials5/lib Traceback (most recent call last): File "/opt/local/bin/scons", line 5, in <module> from SCons.Script.Main import main ModuleNotFoundError: No module named 'SCons' Command failed: cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_science_cantera/cantera/work/cantera-2.5.1" && /opt/local/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10 /opt/local/bin/scons build prefix=/opt/local CC=/usr/bin/clang CXX=/usr/bin/clang++ boost_inc_dir=/opt/local/libexec/boost/1.76/include f90_interface=n googletest=system python_cmd=/opt/local/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10 python_package=full python_prefix=/opt/local/Library/Frameworks/Python.framework/Versions/3.10 renamed_shared_libraries=n system_fmt=y system_eigen=y system_yamlcpp=y extra_inc_dirs=/opt/local/include/eigen3:/opt/local/include/libfmt8:/opt/local/include extra_lib_dirs=/opt/local/lib/libfmt8:/opt/local/lib system_sundials=y sundials_include=/opt/local/libexec/sundials5/include sundials_libdir=/opt/local/libexec/sundials5/lib Exit code: 1
You can't run scons by specifying an alternate python version (3.10 here), because scons requires its python modules which were installed for a specific python version (currently 3.12).
I see that I was the one who made this mistake.
I guess the best we can do is always keep this port using the same python version as the scons port. You could add a comment in the scons port reminding me that if I switch its python version I need to make the same switch in cantera.
Attachments (4)
Change History (6)
comment:1 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)
Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)
Attachment: | c++14.patch added |
---|
Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)
Attachment: | python311.patch added |
---|
Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)
Attachment: | python312.patch added |
---|
comment:2 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)
Replying to ryandesign:
You can't run scons by specifying an alternate python version (3.10 here), because scons requires its python modules which were installed for a specific python version (currently 3.12).
I see that I was the one who made this mistake.
To be fair, cantera says you can do this and I must have tested that it worked before I committed it. I guess it used to work in an old version of scons (at the time, MacPorts had scons 3.1.2) and doesn't work anymore in the current version (at the time of filing this ticket, MacPorts had scons 4.6.0).
I have attempted to fix this, but after doing so, there are so many other problems still preventing the port from building that I am giving up. The port is several versions out of date. Hopefully updating the port will fix the issues.