ClementPinard / FlowNetPytorch

Pytorch implementation of FlowNet by Dosovitskiy et al.
MIT License
856 stars 206 forks source link

ERROR: Failed building wheel for spatial-correlation-sampler Failed to build spatial-correlation-sampler ERROR: Could not build wheels for spatial-correlation-sampler which use PEP 517 and cannot be installed directly #121

Open mahao18cm opened 6 months ago

mahao18cm commented 6 months ago

When i try pip install -r requirement.txt, the error happen.
ERROR: Failed building wheel for spatial-correlation-sampler Failed to build spatial-correlation-sampler ERROR: Could not build wheels for spatial-correlation-sampler which use PEP 517 and cannot be installed directly

saigopalm commented 2 months ago

I am facing the same error! Could you figure out how to resolve it?

ClementPinard commented 2 months ago

Can you try ton install the spatial-correlation-sampler directly and see how it goes ?

I recommend using the --no-build-isolation because otherwise it will download the last version of torch to link the function.

pip install spatial-correlation-sampler --no-build-isolation
saigopalm commented 2 months ago

image image image image image ![Uploading image.png…]()

Still I am getting the same error!

ClementPinard commented 2 months ago

The error is telling you your version of GCC is tool old, you need GCC9 or later.

The purple color scheme somehow makes me think of ubuntu 16.04, is it your distribution ? 😱 If so, you need to upgrade ASAP !

saigopalm commented 2 months ago

image

ClementPinard commented 2 months ago

Ah sorry for freaking out haha, if you want to install gcc 9 on ubuntu 20 , you might want to follow this link : https://askubuntu.com/questions/1370061/i-am-using-ubuntu-20-04-lts-trying-to-get-from-gcc-9-4-to-gcc-10-or-higher

Install it with APT (specify the version), and replace the default gcc with the version 9 (or higher) with sudo update-alternatives --config gcc

saigopalm commented 2 months ago

I am accessing a remote server so can not use sudo and apt.

ClementPinard commented 2 months ago

Your main goal is to redirect the gcc call to gcc-9 or higher. The easiest solution is probably through anaconda. https://anaconda.org/conda-forge/gcc