You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to share the steps we did in order to compile pynfft in Windows with Anaconda, which uses the Visual C compiler.
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).
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.
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.
Install cython, e.g. run pip install cython
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.
Run python setup.py install
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/)
The text was updated successfully, but these errors were encountered:
We want to share the steps we did in order to compile pynfft in Windows with Anaconda, which uses the Visual C compiler.
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).pynfft/util.pyx
, remove the functionsvoronoi_weights_1d
andvoronoi_weights_S2
.setup.py
, replace line 34 bylibraries=['libnfft3_threads-4'],
In case of problems, you might also add the path to the NFFT library to the variableslibrary_dirs
andinclude_dirs
below.pip install cython
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.python setup.py install
import pynfft
. If this fails due to missing DLL dependencies, copy the fileslibnfft3_threads-4.dll
andlibnfft3_threads-4.lib
to the folder where the package is installed (you can see it in the error message, usually something likeanaconda3/lib/site-packages/pyNFFT-1.4.2-py3.9-win-amd64.egg/pynfft/
)The text was updated successfully, but these errors were encountered: