8000 Compiling pynfft in Windows · Issue #78 · pyNFFT/pyNFFT · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Compiling pynfft in Windows #78

8000 New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
michaelquellmalz opened this issue Jul 17, 2024 · 0 comments
Open

Compiling pynfft in Windows #78

michaelquellmalz opened this issue Jul 17, 2024 · 0 comments

Comments

@michaelquellmalz
Copy link

We want to share the steps we did in order to compile pynfft in Windows with Anaconda, which uses the Visual C compiler.

  1. Download the NFFT DLL64 library from https://www-user.tu-chemnitz.de/~potts/nfft/download.php and run lib /def:libnfft3_threads-4.def with the same version of Visual C that is used by Anaconda. In case multiple versions of Visual C are installed, python will not find a library and the error message contains the path to Visual C used in python. Optionally, add the folder with NFFT to the system path (in the Windows environment variables).
  2. Download the current code of pynfft from the master branch. In the pynfft files pynfft/util.pyx, remove the functions voronoi_weights_1d and voronoi_weights_S2.
  3. In the pynfft file setup.py, replace line 34 by libraries=['libnfft3_threads-4'], In case of problems, you might also add the path to the NFFT library to the variables library_dirs and include_dirs below.
  4. Install cython, e.g. run pip install cython
  5. Proceed as in the manual: Run python setup.py build_ext -I <path_to_nfft> -L <path_to_nfft> -R <path_to_nfft> If it complains about runtime libraries, remove the -R <path_to_nfft> option and try again.
  6. Run python setup.py install
  7. Go to a different folder (not the pynfft code), run python and try import pynfft. If this fails due to missing DLL dependencies, copy the files libnfft3_threads-4.dll and libnfft3_threads-4.lib to the folder where the package is installed (you can see it in the error message, usually something like anaconda3/lib/site-packages/pyNFFT-1.4.2-py3.9-win-amd64.egg/pynfft/)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0