Unable to install Deformetrica on MacOS with anaconda3

456 views
Skip to first unread message

adi77...@gmail.com

unread,
Jun 8, 2020, 2:31:14 PM6/8/20
to Deformetrica
Hey, 

I followed the steps from the wiki page, 
  • conda create -n deformetrica python=3.7 && source activate deformetrica
  • conda install -c pytorch -c conda-forge -c anaconda -c aramislab deformetrica

And got the following error, please help. 

Collecting package metadata (current_repodata.json): done

Solving environment: failed with initial frozen solve. Retrying with flexible solve.

Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.

Collecting package metadata (repodata.json): done

Solving environment: failed with initial frozen solve. Retrying with flexible solve.

Solving environment: | 

Found conflicts! Looking for incompatible packages.

This can take several minutes.  Press CTRL-C to abort.

failed                                                                                                                                      


UnsatisfiableError: The following specifications were found

to be incompatible with the existing python installation in your environment:


Specifications:


  - deformetrica -> python[version='2.7.*|3.5.*|3.6.*|>=2.7,<2.8.0a0|>=3.8,<3.9.0a0']


Your python: python=3.7


If python is on the left-most side of the chain, that's the version you've asked for.

When python appears to the right, that indicates that the thing on the left is somehow

not available for the python version you are constrained to. Note that conda will not

change your python version to a different minor version unless you explicitly specify

that.


Please help! Thank you

Ovais Jafri

unread,
Jun 10, 2020, 6:19:04 PM6/10/20
to Deformetrica
Deformetrica 4.3.0rc  is correctly working now..

try this:-
 conda install conda=4.6.2
then
 conda create -n deformetrica python=3.7
 source activate deformetrica

finally
conda install -c pytorch -c conda-forge -c anaconda -c aramislab/label/rc deformetrica

It will fine. Try to deterministic atlas example first with Torch instead of keops. Mine is working ok now.. no more errors.

Alexandre Bône

unread,
Jun 11, 2020, 2:57:07 AM6/11/20
to Deformetrica
Thank you very much Ovais for your solution. 
It is quite annoying however if the keops kernel cannot be used. 

It seems that some package conflicts are now appearing when trying installing Deformetrica. Solving this problem will require a bit of engineering. I hope we will be able to solve this soon. Sorry for the inconvenience meanwhile. 

Best, 
Alex 

adi77...@gmail.com

unread,
Jun 11, 2020, 6:52:18 AM6/11/20
to Deformetrica
Thank you Ovais for your solution. Really appreciated. 

Esther Wershof

unread,
Jun 26, 2020, 3:27:21 PM6/26/20
to Deformetrica
I had to use Ovais' solution and I also cannot use the keops kernel

Mauricio Diaz

unread,
Jun 29, 2020, 8:36:12 AM6/29/20
to Deformetrica
Hi Deformetrica's users,

I suggest you to use the following procedure to install the developer's version of Deformetrica (while we prepare a new release):

1. Clone or update Deformetrica:  git clone https://gitlab.com/icm-institute/aramislab/deformetrica.git
2. Go inside the folder:  cd deformetrica
3. Create a virtual environment: conda create -n deformetrica python=3.7 && source activate deformetrica
4. Install the requirements inside the new environment: pip install -r requirements.txt
5. Install developer version of Deformetrica: pip install .

I tested in a Linux machine and also in a Mac machine and it works. Normally, you will be able to use the Keops Kernels (if a gpu card is available.)

Best,

--
Mauricio

Esther Wershof

unread,
Jun 29, 2020, 3:04:14 PM6/29/20
to Deformetrica
Hi Mauricio

Thanks for the reply, I'm still having some trouble with it. When I run deformetrica estimate model.xml data_set.xml -p optimization_parameters.xml it gives a very long error, I've included the principal lines of it:

#error This file requires compiler and library support for the \

  ^

CMake Error at keopslibKeOpstorch8412e59d0c_generated_link_autodiff.cu.o.Release.cmake:219 (message):

  Error generating

...

ModuleNotFoundError: No module named 'libKeOpstorch8412e59d0c'


Originally it was unhappy because it wanted me to install cmake, which I did (via conda) but then this error came up. Any help greatly appreciated!

Mauricio Diaz

unread,
Jun 29, 2020, 4:00:14 PM6/29/20
to Deformetrica
Hi Esther,

The python bindings  for Keops are compiled on the fly, when running Deformetrica. That means that you need to have all the pyKeops requirements (see here). In short:
  • Python 3 with packages numpy and GPUtil.

  • A C++ compiler compatible with std=c++14: g++ version >=7 or clang++ version >=8.

  • The Cmake build system, version >= 3.10.

  • The Cuda toolkit, including the nvcc compiler (optional): version >=10.0 is recommended. Make sure that your C++ compiler is compatible with the installed nvcc.

  • PyTorch (optional): version >= 1.1.0.

Once you have verified that you have installed all the requirements (mainly a C++ compiler compatible with std=c++14), you can test if the pyKeops bidings can be compiled by typing the following commands inside a python shell (from the Deformerica's environment, conda activate deformetrica):

import pykeops
pykeops.verbose = True
pykeops.build_type = 'Debug'
pykeops.clean_pykeops()
pykeops.test_torch_bindings()

For further details you can consult this issue from pyKeops.

Best,

Mauricio Diaz

unread,
Jun 29, 2020, 4:02:10 PM6/29/20
to Deformetrica
Sorry, I forgot the link to the issue in my last message: https://github.com/getkeops/keops/issues/56

Esther Wershof

unread,
Jul 8, 2020, 12:10:28 PM7/8/20
to Deformetrica
Thanks for the info, I've been into the github link, but it seems quite complex and I can't get of the bottom of it. When do you think the new release that circumvents this problem will be available?

Mauricio Diaz

unread,
Jul 10, 2020, 3:52:10 AM7/10/20
to Deformetrica
Hi,

In fact, the trouble comes from the distribution/compilation method chosen by pyKeops developers. A new release of Deformetrica that fix this issue depends strongly on the way how pyKeops is distributed (no plans in the short-term). However, you can use the instructions that I proposed above to run the developer's version of Deformetrica.

Can you please verify it you have all the requirements to build pyKeops? (mainly a C++ compiler compatible with std=c++14),
To do this, you can run g++ --version from the command line if you use a Linux machine. If the output is >= 7, it should be ok.

Esther Wershof

unread,
Jul 13, 2020, 7:15:02 AM7/13/20
to Deformetrica
Hi Mauricio

Thanks for your help, you were right, I had to upgrade the C++ compiler. I managed to get it working. Just in case anybody else needs to go through this, another problem I encountered was:
Prebuilt binaries do not work with pytorch - solution is given here: https://github.com/getkeops/keops/issues/59
Lastly, to actually get deformetrica run, before activating the deformetrica environment I had to run the following:

export CUDA_HOME=/usr/local/cuda

export PATH=${CUDA_HOME}/bin:${PATH}

export LD_LIBRARY_PATH=${CUDA_HOME}/lib64:$LD_LIBRARY_PATH

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/name/miniconda3/lib/

module add cuda


Thanks again for your help

Esther

Reply all
Reply to author
Forward
0 new messages