Opened 3 months ago

Last modified 5 weeks 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:

https://build.macports.org/builders/ports-10.13_x86_64-builder/builds/221839/steps/install-port/logs/stdio

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)

Portfile.diff (1.7 KB) - added by ryandesign (Ryan Carsten Schmidt) 5 weeks ago.
WIP
c++14.patch (413 bytes) - added by ryandesign (Ryan Carsten Schmidt) 5 weeks ago.
python311.patch (1.1 KB) - added by ryandesign (Ryan Carsten Schmidt) 5 weeks ago.
python312.patch (989 bytes) - added by ryandesign (Ryan Carsten Schmidt) 5 weeks ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 5 weeks ago by ryandesign (Ryan Carsten Schmidt)

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.

Changed 5 weeks ago by ryandesign (Ryan Carsten Schmidt)

Attachment: Portfile.diff added

WIP

Changed 5 weeks ago by ryandesign (Ryan Carsten Schmidt)

Attachment: c++14.patch added

Changed 5 weeks ago by ryandesign (Ryan Carsten Schmidt)

Attachment: python311.patch added

Changed 5 weeks ago by ryandesign (Ryan Carsten Schmidt)

Attachment: python312.patch added

comment:2 in reply to:  description Changed 5 weeks 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).

Last edited 5 weeks ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)
Note: See TracTickets for help on using tickets.