Git Product home page Git Product logo

Comments (10)

jacobrgardner avatar jacobrgardner commented on June 12, 2024 1

Since you are on Ubuntu, could you try installing fftw via apt-get? I think the package names are libfftw3-3 and libfftw3-dev, but it might find them if you just try fftw3.

I can look further at what the package name is when I'm actually in front of a computer if none of those work :-).

@gpleiss I think I've run in to this issue, I'm not actually totally convinced that installing fftw from conda works every time.

from gpytorch.

gpleiss avatar gpleiss commented on June 12, 2024 1

I can't reproduce this error. Here's the steps I've taken on MacOS (w/o CUDA):

# Create a new environment
conda create --name test_env
source activate test_env
conda install ipython
source activate test_env

# Install the base libraries - based on the README instructions
conda install fftw cffi pytorch torchvision -c conda-forge -c pytorch

git clone https://github.com/cornellius-gp/gpytorch.git ~/workspace/gpytorch
cd ~/workspace/gpytorch
python setup.py install

Then, when I'm working in another directory, in an ipython shell

import gpytorch  # Works!

from gpytorch.

imsrgadich avatar imsrgadich commented on June 12, 2024

Problem solved after installing libfftw3-3 and libfftw3-dev. But I used aptdcon instead of apt-get as I'm on university desktop.

Thanks for the suggestion!

from gpytorch.

gpleiss avatar gpleiss commented on June 12, 2024

@imsrgadich I think we've solved the issue more generally, but it seems that you've already got a good workaround :)

from gpytorch.

imsrgadich avatar imsrgadich commented on June 12, 2024

I get the same error on MacOS as well.

from gpytorch.

gpleiss avatar gpleiss commented on June 12, 2024

@imsrgadich can you print the macos error? Were you using the latest version of master? And did you install fftw using anaconda? conda install fftw -c conda-forge?

from gpytorch.

imsrgadich avatar imsrgadich commented on June 12, 2024

Hi, I will try to reproduce the error and post it here.

Can you tell me how to get rid of this error

ImportError: No module named 'gpytorch.libfft._libfft'

This is after adding libraries = ['fftw3','fftw3f'] (from issue #20) to build.py and built it using python setup.py build. I tried reinstalling everything using the aforementioned process but in vain. Any help is apprecaited.

Full error below.

ImportError                               Traceback (most recent call last)
<ipython-input-1-07f2f1fbde88> in <module>()
      1 import math
      2 import torch
----> 3 import gpytorch
      4 from matplotlib import pyplot as plt
      5 

/l/gadichs1/gitrepos/aalto/gpytorch/gpytorch/__init__.py in <module>()
----> 1 from .module import Module
      2 from . import models
      3 from . import means
      4 from . import mlls
      5 from . import kernels

/l/gadichs1/gitrepos/aalto/gpytorch/gpytorch/module.py in <module>()
      8 from torch import nn
      9 from torch.autograd import Variable
---> 10 from .random_variables import RandomVariable
     11 from .lazy import LazyVariable
     12 from .variational import VariationalStrategy

/l/gadichs1/gitrepos/aalto/gpytorch/gpytorch/random_variables/__init__.py in <module>()
----> 1 from .random_variable import RandomVariable
      2 from .bernoulli_random_variable import BernoulliRandomVariable
      3 from .categorical_random_variable import CategoricalRandomVariable
      4 from .dirichlet_random_variable import DirichletRandomVariable
      5 from .gaussian_random_variable import GaussianRandomVariable

/l/gadichs1/gitrepos/aalto/gpytorch/gpytorch/random_variables/random_variable.py in <module>()
      6 import torch
      7 from torch.autograd import Variable
----> 8 from ..lazy import LazyVariable
      9 
     10 

/l/gadichs1/gitrepos/aalto/gpytorch/gpytorch/lazy/__init__.py in <module>()
     12 from .sum_lazy_variable import SumLazyVariable
     13 from .sum_batch_lazy_variable import SumBatchLazyVariable
---> 14 from .toeplitz_lazy_variable import ToeplitzLazyVariable
     15 
     16 

/l/gadichs1/gitrepos/aalto/gpytorch/gpytorch/lazy/toeplitz_lazy_variable.py in <module>()
      7 from torch.autograd import Variable
      8 from .lazy_variable import LazyVariable
----> 9 from ..utils.toeplitz import sym_toeplitz_matmul, sym_toeplitz_derivative_quadratic_form
     10 
     11 

/l/gadichs1/gitrepos/aalto/gpytorch/gpytorch/utils/toeplitz.py in <module>()
      5 
      6 import torch
----> 7 import gpytorch.utils.fft as fft
      8 import gpytorch.utils as utils
      9 

/l/gadichs1/gitrepos/aalto/gpytorch/gpytorch/utils/fft.py in <module>()
      4 from __future__ import unicode_literals
      5 
----> 6 from .. import libfft
      7 
      8 

/l/gadichs1/gitrepos/aalto/gpytorch/gpytorch/libfft/__init__.py in <module>()
      1 
      2 from torch.utils.ffi import _wrap_function
----> 3 from ._libfft import lib as _lib, ffi as _ffi
      4 
      5 __all__ = []

ImportError: No module named 'gpytorch.libfft._libfft'

from gpytorch.

gpleiss avatar gpleiss commented on June 12, 2024

Did you try conda install fftw -c conda-forge?

from gpytorch.

imsrgadich avatar imsrgadich commented on June 12, 2024

Worked on Ubuntu (with CUDA) but no luck on MacOS (w/o CUDA).

from gpytorch.

imsrgadich avatar imsrgadich commented on June 12, 2024

There are few things I'm not able to understand. When I run python setup.py build the build files are created and stored in /build/. This creates two directories lib.linux-x86_64-3.5 and temp.linux-x86_64-3.5. The latter directory has gpytorch.libfft._libfft.o which the python code is searching in /gpytorch/libfft/ which is empty. Is there something the build process is missing? or I missed something. I moved the object file to /gpytorch/libfft/ and the issue solved. Thanks.

from gpytorch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.