Yes, it seems that Smuthi cannot be used with Python 3.11. Please try Python 3.10 or older.
ERROR: Failed to build installable wheels for some pyproject.toml based projects (smuthi) --
Smuthi project repository: https://gitlab.com/AmosEgel/smuthi
Online documentation https://smuthi.readthedocs.io/en/latest/
---
You received this message because you are subscribed to the Google Groups "Smuthi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smuthi+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/smuthi/4da39813-fd2f-46ac-bbaa-da07d810e3a3n%40googlegroups.com.
Of course. Here is a comprehensive guide to installing smuthi
, compiling all the problems we solved into a single, step-by-step process.
Before starting, your system needs essential development tools. This guide uses commands for Debian/Ubuntu-based systems.
Install Git:
sudo apt install git
Install Build Tools: You need a C and Fortran compiler, plus the development libraries required to build Python from source.
sudo apt update
sudo apt install -y build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev curl libncursesw5-dev xz-utils \
tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
Do not use your system's default Python. Install a specific, older version using pyenv
to avoid conflicts.
Install pyenv
:
curl https://pyenv.run | bash
Configure Your Shell: Add the following lines to the end of your ~/.bashrc
or ~/.zshrc
file, then restart your terminal.
export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
Install Python 3.9:
pyenv install 3.9.19
This is the most critical phase. We will create a virtual environment and install the specific, older build tools that smuthi
requires.
Create a Project Directory:
mkdir smuthi_install
cd smuthi_install
Set the Local Python Version:
pyenv local 3.9.19
Create and Activate a Virtual Environment:
python -m venv venv
source venv/bin/activate
Your terminal prompt should now start with (venv)
.
Install Pinned Build Tools: Install old, compatible versions of setuptools
, numpy
, and wheel
. This is essential to prevent compiler and build system errors.
pip install "setuptools<60.0" "numpy<1.20" wheel
Now, install smuthi
itself, using flags to prevent its automatic dependency resolution from breaking our carefully prepared environment.
Note on GitLab Access: While SSH access is possible, using the simple HTTPS URL (https://...
) is recommended as it avoids the public key permissions errors we encountered. The correct repository is AmosEgel/smuthi
.
Run the Installation Command:
This command uses --no-build-isolation to force pip to use our installed tools and --no-deps to prevent it from installing conflicting dependencies.
pip install --no-build-isolation --no-deps git+https://gitlab.com/AmosEgel/smuthi.git
Because we used --no-deps
, you must now manually install all the other packages smuthi
needs to run. Installing them all at once with versions pinned for compatibility is the most reliable method.
Install All Dependencies:
pip install tqdm argparse mpmath psutil pycparser pywigxjpf pyyaml sympy "matplotlib<3.6" "h5py<3.2" "imageio<2.23" "numba<0.56" "scipy<1.6"
At this point, smuthi
is fully installed and functional within this terminal environment. You can test it with python -c "import smuthi"
.
To use this working environment in a notebook, you must register it as a Jupyter kernel.
Activate Your Environment (if not already active):
source venv/bin/activate
Install ipykernel
:
pip install ipykernel
Link the Environment to Jupyter:
python -m ipykernel install --user --name=smuthi_env --display-name="Python (smuthi)"
Usage: Restart VS Code or your Jupyter server. You can now select "Python (smuthi)" as your kernel, giving you access to your working installation.
To view this discussion visit https://groups.google.com/d/msgid/smuthi/0bd80a37-c407-4958-8b6a-8a9237b930f8%40gmail.com.
Hadi K. Shamkhi, PhD
Physics and Mathematics
Republic of Singapore