python – How to Migrate from Conda to uv in a Multi-Platform Project with C++ Compiled Modules?

I want to migrate from conda to uv in an existing project with conda_deps_linux.txt, conda_deps_osx.txt, conda_deps_win.txt, conda_deps_linux_aarch64.txt, enviroment.yaml, and specified how to install the package for each platform in the setup.py using pip install -e .. I need to specify different platforms because the C++ compiled module (binary files) in the project requires it.

This is the content of enviroment.yaml:

name: the_project
channels:
  - conda-forge
dependencies:
  - h5py
  - nnpops
  - pip
  - pytorch
  - pytorch_geometric
  - lightning
  - torchmetrics
  - tqdm
  # Dev tools
  - flake8
  - pytest
  - psutil
  - gxx

This is conda_deps_osx.txt:

h5py
nnpops
pip
libtorch>=2.5.1
pytorch-cpu>=2.5.1
pytorch_geometric
lightning
torchmetrics
tqdm
clangxx
llvm-openmp
pybind11

I can omit the windows setup but I wonder How can I

Read more here: Source link