Hi,
Calling python directly and then doing:
import code_aster
will not work in the Docker image. code_aster is not installed as a regular Python package available from the default Python environment, so it will not appear in pip list.
The intended entry point is run_aster. It is mainly a wrapper around the Python executable used by code_aster, with the proper environment, paths and execution context.
For example, if you create a file demo.py:
import code_aster
print("Hello from code_aster")
and run it with:
run_aster demo.py
then the import should work.
So, in practice, there are two possible approaches:
If you want to drive code_aster from an external Python application, the most robust way is usually to generate a .comm or Python command file and call run_aster from your Python code, for example using subprocess.
If you want your script itself to import code_aster, then this script must be executed through run_aster, not through the standard python command.
A .comm file in code_aster is already Python-based, so for most use cases such as linear modal analysis or nonlinear static analysis, the usual workflow is still to write or generate a command file and execute it with run_aster.
Best,