titanlib icon indicating copy to clipboard operation
titanlib copied to clipboard

Getting `make install-python-user` to target the conda environment.

Open TomHodson opened this issue 6 months ago • 0 comments

On an Apple M1 Arm machine and trying to install from source, I cannot get the final make install-python-user install command to install into my conda environment.

Inital steps:

conda env create --file=deps.yml
conda activate condatitanlib

cmake -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DBUILD_R=OFF . -B build

cd build
make -j 12
make install 
make install-python-user -j 12

This final command prints (print statement here) INSTALL DIR /Users/[my_username]/.local/lib/python3.10/site-packages

Which won't work because all the dependencies are in the conda env.

I tried the nuclear option of manually specifying the location of the python but that doesn't seem to affect the output of distutils.sysconfig.get_python_lib here.

-DPYTHON_INCLUDE_DIR=$(python -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")  \
-DPYTHON_LIBRARY=$(python -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))") \
-DNUMPY_INCLUDE_DIRS=$(python -c "import numpy; print(numpy.get_include())") \
-DPYTHON_EXECUTABLE:FILEPATH=$(which python) \

What is the intended way to install the python bindings into a conda environment?

TomHodson avatar Jul 30 '24 11:07 TomHodson