uv is an extremely fast Python package and project manager, written in Rust. However, some Python package depends some non-Python packages, e.g. boost, then install using conda is still a better way.
Install uv
Follow the instructions on the uv documentation to install uv on your system.
On macOS and Linux, you can install uv using the following command:
curl -LsSf https://astral.sh/uv/install.sh | shCreate a virtual environment using uv
uv venvThis will create a virtual environment under .venv. If you want to choose the specific version of Python (e.g. 3.1.2), you just use:
uv venv --python 3.12If you want to create a virtual environment under a specific directory (e.g. my-name), you can use:
uv venv my-nameActivate virtual environment
Just type the following command to activate the virtual environment:
source activate path-to-venv/bin/activatewhere path-to-venv is the path to the virtual environment you created using uv venv. For example, if you created a virtual environment under .venv, you can use:
source .venv/bin/activateInstall packages
Just use uv pip install to install packages from PyPI.
uv pip install numpy scipy matplotlib seaborn pandas pymatgen phonopy ase pytables scikit-learn numba glob2 jupyterDeactivate virtual environment
Just type deactivate to quit this virtual environment.