PyMAPDL と MacOS.#
PyMAPDLをインストールする.#
PyMAPDLの要件を満たすMacOSには、次のコマンドを使ってPyMAPDLを普通にインストールできます:
pip install ansys-mapdl-core
While PyMAPDL requires a connection to an MAPDL live instance to function, MAPDL is not compatible with a MacOS.
There are two options:
Connect to a remote instance: You can connect to a remote instance running on a Windows or Linux machine as indicated in Connect to the local MAPDL instance.
Launch MAPDL locally using Docker: You can run MAPDL on a MacOS machine as indicated in Launch MAPDL on MacOS.
Launch MAPDL on MacOS#
If you do not have an MAPDL Docker image, you can create one on a Linux machine as indicated in 独自のMAPDL dockerコンテナを作成する.
If you already have an MAPDL Docker image, you can launch MAPDL as indicated in Run an MAPDL Docker image.
Apple Silicon compatibility#
If you are using an Apple Silicon device (for instance M1 or M2), you might see the following warning:
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
This is because the Docker image has not been built to run on the Apple Silicon architecture (arm64).
You must add the --platform linux/amd64
argument to the docker run command
as shown in this code example:
ANSYSLMD_LICENSE_FILE=1055@MY_LICENSE_SERVER_IP
LOCAL_MAPDL_PORT=50053
MAPDL_DOCKER_REGISTRY_URL=ghcr.io/myuser/myrepo/mymapdldockerimage
docker run -e ANSYSLMD_LICENSE_FILE=$ANSYSLMD_LICENSE_FILE --restart always --name mapdl -p $LOCAL_MAPDL_PORT:50052 --platform linux/amd64 $MAPDL_DOCKER_REGISTRY_URL -smp > log.txt
Connect to an MAPDL container#
You can connect to an MAPDL instance as indicated in Connect to the local MAPDL instance.