cyang-kth/fmm

ImportError: No module named _fmm

Closed this issue · 3 comments

Dear Can,

Thank you for sharing the amazing work!

I have an ImportError. I installed FMM in Anaconda python 2.7.15, using Cygwin under Windows 10. I have successfully installed fmm but when using it, I encountered an ImportError as follows:

jwzha@xxx /cygdrive/d/xxxs/MapMatch/fmm_conda/fmm/build
$ python
Python 2.7.15 (default, Mar 5 2020, 14:56:45) [MSC v.1500 64 bit (AMD64)] on wi
n32
Type "help", "copyright", "credits" or "license" for more information.

import fmm
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\jwzha.conda\envs\fmm\lib\site-packages\fmm.py", line 15, in
import _fmm
ImportError: No module named _fmm

The cmake .. returns the following:

$ cmake ..
-- CMAKE version 3.17.3
-- Set CMP0074 state to NEW
-- Set CMP0086 state to NEW
-- Set CMP0078 state to NEW
conda environments:

base * C:\ProgramData\Anaconda3
cvxpy C:\ProgramData\Anaconda3\envs\cvxpy
arcgispro-py3 C:\Users\jwzha.conda\envs\arcgispro-py3
fmm C:\Users\jwzha.conda\envs\fmm
ox C:\Users\jwzha.conda\envs\ox
rstudio C:\Users\jwzha.conda\envs\rstudio

-- Set CONDA_PREFIX C:\ProgramData\Anaconda3
-- GDAL headers found at /usr/include
-- GDAL library found at /usr/lib/libgdal.dll.a
-- Boost headers found at /usr/include
-- Boost library found at /usr/lib/libboost_serialization.dll.a
-- Boost library version 1_66
-- OpenMP_HEADERS found at
-- OpenMP_CXX_LIBRARIES found at /usr/lib/gcc/x86_64-pc-cygwin/10/libgomp.dll.a
-- Installation folder /usr/local
-- Not install fmm headers
-- Add python cmake information
-- Swig version is 4.0.2
-- Python header found at /cygdrive/c/Users/jwzha/.conda/envs/fmm/include
-- Python library found at /cygdrive/c/Users/jwzha/.conda/envs/fmm/libs/python27.lib
-- Python packages C:\Users\jwzha.conda\envs\fmm\Lib\site-packages
-- Using swig add library
-- Configuring done
-- Generating done
-- Build files have been written to: /cygdrive/d/xxx/MapMatch/fmm_conda/fmm/build

I wonder what causes this error. Thank you in advance!

Best,
Jasmine

I have not tried with conda on Windows. Conda should also be installed inside the cygwin. If you install conda directly for windows I don't think it will work.

-- Python header found at /cygdrive/c/Users/jwzha/.conda/envs/fmm/include
-- Python library found at /cygdrive/c/Users/jwzha/.conda/envs/fmm/libs/python27.lib
-- Python packages C:\Users\jwzha.conda\envs\fmm\Lib\site-packages

Hi Can,

Thanks for your quick reply! I've succeeded with python2.7 using ubuntu virtual machine.

Best,
Jasmine

Thank you for this notice. I think it is better to add a suggestion for installation in ubuntu VM on Windows platform.