Closed davmol closed 4 years ago
@davmol
Which version did you run this program? Is it the latest master version?
@davmol
Which version did you run this program? Is it the latest master version?
It's the latest. Cloned this afternoon.
@davmol Make sure that
fmm/python/build
cd python/build
cmake ..
You should see which python is used to build the library (You can clean that folder and rerun the command to see the information if it does not update and print that information).
Check this link to see if it helps https://fmm-wiki.github.io/docs/installation/qa.html
@davmol Make sure that
- You have the PYTHON_PATH set to include the folder
fmm/python/build
- The python version you are currently using is consistent with the one used for installation of python binding
cd python/build cmake ..
You should see which python is used to build the library (You can clean that folder and rerun the command to see the information if it does not update and print that information).
Check this link to see if it helps https://fmm-wiki.github.io/docs/installation/qa.html
The python path is set otherwise the import fmm wouldn't find fmm.py in ../python/build. But I'll try to compile again as you have suggested and will give a feedback.
The Cygwin install I had was a complete fresh one. After I have deleted the build folder I repeated the installation steps onwards from "Install python extension" giving me:
XXX+dmolitor@XXX ~/fmm/python/build
$ cmake -Wno-dev ..
-- Boost version: 1.66.0
-- Found the following Boost libraries:
-- serialization
-- Creating makefiles for system: CYGWIN-3.1.4(0.340/5/3)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/dmolitor/fmm/python/build
XXX+dmolitor@XXXX ~/fmm/python/build
$ make
make[1]: Verzeichnis „/home/dmolitor/fmm/python/build“ wird betreten
make[2]: Verzeichnis „/home/dmolitor/fmm/python/build“ wird betreten
make[2]: Verzeichnis „/home/dmolitor/fmm/python/build“ wird verlassen
[ 83%] Built target pyfmm
make[2]: Verzeichnis „/home/dmolitor/fmm/python/build“ wird betreten
make[2]: Verzeichnis „/home/dmolitor/fmm/python/build“ wird verlassen
[ 88%] Built target fmm_swig_compilation
make[2]: Verzeichnis „/home/dmolitor/fmm/python/build“ wird betreten
make[2]: Verzeichnis „/home/dmolitor/fmm/python/build“ wird verlassen
[100%] Built target _fmm
make[1]: Verzeichnis „/home/dmolitor/fmm/python/build“ wird verlassen
testing the test.py gives me the same Import Error:
XXX+dmolitor@XXX ~/fmm/python
$ python fmm_test.py
Traceback (most recent call last):
File "fmm_test.py", line 1, in <module>
from fmm import Network,NetworkGraph,STMATCH,STMATCHConfig
File "/home/dmolitor/fmm/python/build/fmm.py", line 17, in <module>
_fmm = swig_import_helper()
File "/home/dmolitor/fmm/python/build/fmm.py", line 16, in swig_import_helper
return importlib.import_module('_fmm')
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No such file or directory
the command line fmm is working:
XXX+dmolitor@XXX ~/fmm/python
$ fmm
[info][fmm_app_config.cpp:49 ] Start reading FMM configuration from arguments
fmm argument lists:
--ubodt (required) <string>: Ubodt file name
--network (required) <string>: Network file name
--network_id (optional) <string>: Network id name (id)
.....
Any Ideas? :)
@davmol
I have pushed a commit to print the libraries for that information. Can you pull the latest version of the master branch and run cmake ..
to see what is the output there?
will do
a new pull resulted in the same Error:
XXX+dmolitor@XXX ~/fmm/python
$ python fmm_test.py
Traceback (most recent call last):
File "fmm_test.py", line 1, in <module>
from fmm import Network,NetworkGraph,STMATCH,STMATCHConfig
File "/home/dmolitor/fmm/python/build/fmm.py", line 17, in <module>
_fmm = swig_import_helper()
File "/home/dmolitor/fmm/python/build/fmm.py", line 16, in swig_import_helper
return importlib.import_module('_fmm')
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No such file or directory
output of cmake:
XXX+dmolitor@XXX ~/fmm/python/build
$ cmake -Wno-dev ..
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++.exe
-- Check for working CXX compiler: /usr/bin/c++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found SWIG: /usr/bin/swig.exe (found version "3.0.12")
-- Swig version is 3.0.12
-- Found GDAL: /usr/lib/libgdal.dll.a (found suitable version "3.0.4", minimum required is "2.2")
-- GDAL headers found at /usr/include
-- GDAL library found at /usr/lib/libgdal.dll.a
-- Found PythonLibs: /usr/lib/libpython2.7.dll.a (found suitable version "2.7.16", minimum required is "2.7")
-- Python header found at /usr/include/python2.7
-- Python library found at /usr/lib/libpython2.7.dll.a
-- Boost version: 1.66.0
-- Found the following Boost libraries:
-- serialization
-- Boost headers found at /usr/include
-- Boost library found at /usr/lib/libboost_serialization.dll.a
-- Using swig add library
-- Creating makefiles for system: CYGWIN-3.1.4(0.340/5/3)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/dmolitor/fmm/python/build
XXX+dmolitor@XXX ~/fmm/python/build
$ make
make[1]: Verzeichnis „/home/dmolitor/fmm/python/build“ wird betreten
make[2]: Verzeichnis „/home/dmolitor/fmm/python/build“ wird betreten
Scanning dependencies of target pyfmm
make[2]: Verzeichnis „/home/dmolitor/fmm/python/build“ wird verlassen
make[2]: Verzeichnis „/home/dmolitor/fmm/python/build“ wird betreten
[ 5%] Building CXX object CMakeFiles/pyfmm.dir/home/dmolitor/fmm/src/core/geometry.cpp.o
[ 11%] Building CXX object CMakeFiles/pyfmm.dir/home/dmolitor/fmm/src/algorithm/geom_algorithm.cpp.o
[ 16%] Building CXX object CMakeFiles/pyfmm.dir/home/dmolitor/fmm/src/config/gps_config.cpp.o
[ 22%] Building CXX object CMakeFiles/pyfmm.dir/home/dmolitor/fmm/src/config/network_config.cpp.o
[ 27%] Building CXX object CMakeFiles/pyfmm.dir/home/dmolitor/fmm/src/config/result_config.cpp.o
[ 33%] Building CXX object CMakeFiles/pyfmm.dir/home/dmolitor/fmm/src/util/util.cpp.o
[ 38%] Building CXX object CMakeFiles/pyfmm.dir/home/dmolitor/fmm/src/network/network.cpp.o
[ 44%] Building CXX object CMakeFiles/pyfmm.dir/home/dmolitor/fmm/src/network/network_graph.cpp.o
[ 50%] Building CXX object CMakeFiles/pyfmm.dir/home/dmolitor/fmm/src/network/rtree.cpp.o
[ 55%] Building CXX object CMakeFiles/pyfmm.dir/home/dmolitor/fmm/src/mm/composite_graph.cpp.o
[ 61%] Building CXX object CMakeFiles/pyfmm.dir/home/dmolitor/fmm/src/mm/transition_graph.cpp.o
[ 66%] Building CXX object CMakeFiles/pyfmm.dir/home/dmolitor/fmm/src/mm/fmm/fmm_algorithm.cpp.o
[ 72%] Building CXX object CMakeFiles/pyfmm.dir/home/dmolitor/fmm/src/mm/fmm/ubodt.cpp.o
[ 77%] Building CXX object CMakeFiles/pyfmm.dir/home/dmolitor/fmm/src/mm/stmatch/stmatch_algorithm.cpp.o
[ 83%] Linking CXX shared library cygpyfmm.dll
make[2]: Verzeichnis „/home/dmolitor/fmm/python/build“ wird verlassen
[ 83%] Built target pyfmm
make[2]: Verzeichnis „/home/dmolitor/fmm/python/build“ wird betreten
Scanning dependencies of target fmm_swig_compilation
make[2]: Verzeichnis „/home/dmolitor/fmm/python/build“ wird verlassen
make[2]: Verzeichnis „/home/dmolitor/fmm/python/build“ wird betreten
[ 88%] Swig compile fmm.i for python
/home/dmolitor/fmm/python/../src/mm/fmm/fmm_algorithm.hpp:51: Warning 314: 'print' is a python keyword, renaming to '_print'
/home/dmolitor/fmm/python/../src/mm/stmatch/stmatch_algorithm.hpp:57: Warning 314: 'print' is a python keyword, renaming to '_print'
/home/dmolitor/fmm/python/../src/core/geometry.hpp:207: Warning 503: Can't wrap 'operator <<' unless renamed to a valid identifier.
/home/dmolitor/fmm/python/../src/network/network.hpp:175: Warning 509: Overloaded method FMM::NETWORK::Network::route2geometry(std::vector< FMM::NETWORK::EdgeIndex,std::allocator< FMM::NETWORK::EdgeIndex > > const &) const effectively ignored,
/home/dmolitor/fmm/python/../src/network/network.hpp:168: Warning 509: as it is shadowed by FMM::NETWORK::Network::route2geometry(std::vector< FMM::NETWORK::EdgeID,std::allocator< FMM::NETWORK::EdgeID > > const &) const.
make[2]: Verzeichnis „/home/dmolitor/fmm/python/build“ wird verlassen
[ 88%] Built target fmm_swig_compilation
make[2]: Verzeichnis „/home/dmolitor/fmm/python/build“ wird betreten
Scanning dependencies of target fmm
make[2]: Verzeichnis „/home/dmolitor/fmm/python/build“ wird verlassen
make[2]: Verzeichnis „/home/dmolitor/fmm/python/build“ wird betreten
[ 94%] Building CXX object CMakeFiles/fmm.dir/CMakeFiles/fmm.dir/fmmPYTHON_wrap.cxx.o
[100%] Linking CXX shared module _fmm.dll
make[2]: Verzeichnis „/home/dmolitor/fmm/python/build“ wird verlassen
[100%] Built target fmm
make[1]: Verzeichnis „/home/dmolitor/fmm/python/build“ wird verlassen
@davmol
I am not quite sure if the problem is caused by this problem
Verzeichnis „/home/dmolitor/fmm/python/build“ wird verlassen
@davmol
When you run python
in your terminal, did you check which python
which python
$ which python
/usr/bin/python
If you run this command directly in the python/build folder
python
import fmm
Did you get the same error?
indeed that's working
XXX+dmolitor@XXX ~/fmm/python/build
$ python
Python 2.7.16 (default, Mar 20 2019, 12:15:19)
[GCC 7.4.0] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import fmm
>>>
Then the problem could be your PYTHONPATH is not set correctly.
Although that file is found correctly, the log of your make command shows this
Verzeichnis „/home/dmolitor/fmm/python/build“ wird betreten
Maybe that is the reason. The two quotes there seem to be strange.
I deleted the export of the path being:
export PYTHONPATH=${PYTHONPATH}:/home/dmolitor/fmm/python/build
and tried importing from a different folder via:
XXX+dmolitor@XXX ~/sprint1
$ python
Python 2.7.16 (default, Mar 20 2019, 12:15:19)
[GCC 7.4.0] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path.insert(0, '/home/dmolitor/fmm/python/build')
>>> import fmm
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/dmolitor/fmm/python/build/fmm.py", line 17, in <module>
_fmm = swig_import_helper()
File "/home/dmolitor/fmm/python/build/fmm.py", line 16, in swig_import_helper
return importlib.import_module('_fmm')
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No such file or directory
but having no luck
Then the problem could be your PYTHONPATH is not set correctly.
Although that file is found correctly, the log of your make command shows this
Verzeichnis „/home/dmolitor/fmm/python/build“ wird betreten
Maybe that is the reason. The two quotes there seem to be strange.
I think the quotes are due to the German language. One lower at the beginning and one upper to the end marks a quote... see: https://german.stackexchange.com/questions/117/what-is-the-correct-way-to-denote-a-quotation-in-german
What does this mean? wird verlassen, wird betreten
What does this mean? wird verlassen, wird betreten
Verzeichnis -> directory wird verlassen -> is being exited/left wird betreten -> is being entered
also very strange is this behaviour import from a different file within in the ../python/build folder:
XXX+dmolitor@XXX ~/fmm/python/build
$ python mm_test_1.py
Traceback (most recent call last):
File "mm_test_1.py", line 18, in <module>
import fmm
File "/home/dmolitor/fmm/python/build/fmm.py", line 17, in <module>
_fmm = swig_import_helper()
File "/home/dmolitor/fmm/python/build/fmm.py", line 16, in swig_import_helper
return importlib.import_module('_fmm')
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No such file or directory
Can you also provide the cmake and make command of build the C++ program?
It seems that some path is broken in the installation, perhaps with the so library file.
I want to compare it to see if the following is normal
make[2]: Verzeichnis „/home/dmolitor/fmm/python/build“ wird verlassen
make[2]: Verzeichnis „/home/dmolitor/fmm/python/build“ wird betreten
Generally, there should not be a step of enter/leave this folder.
@davmol
I just find this link, whose problem is quite similar to this one. https://rna.urmc.rochester.edu/Overview/Python.html
Workaround: Add system libraries to your path. PATH+=:'/usr/x86_64-w64-mingw32/sys-root/mingw/bin'
The above path may not be appropriate for your system. You can list the required dynamically linked files with the following shell command: ldd exe/_RNAstructure_wrap.dll
In the output, look for these files (if present) and make sure their parent directory is in your PATH: libgcc_s_seh-1.dll libwinpthread-1.dll libstdc++-6.dll The following files may also be present, but can be ignored: ntdll.dll kernel32.dll KERNELBASE.dll msvcrt.dll USER32.dll GDI32.dll LPK.dll USP10.dll libpython2.7.dll
Can you also provide the cmake and make command of build the C++ program?
It seems that some path is broken in the installation, perhaps with the so library file.
I want to compare it to see if the following is normal
make[2]: Verzeichnis „/home/dmolitor/fmm/python/build“ wird verlassen make[2]: Verzeichnis „/home/dmolitor/fmm/python/build“ wird betreten
Generally, there should not be a step of enter/leave this folder.
unfortunately I don't have the output anymore since I rebased Cygwin..
But I think I isolated the problem. If there is a none native python library being imported before fmm the error occurs:
not working:
XXX+dmolitor@XXX ~/fmm/python/build
$ python
Python 2.7.16 (default, Mar 20 2019, 12:15:19)
[GCC 7.4.0] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import fiona
>>> import fmm
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "fmm.py", line 17, in <module>
_fmm = swig_import_helper()
File "fmm.py", line 16, in swig_import_helper
return importlib.import_module('_fmm')
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No such file or directory
working
XXX+dmolitor@XXX ~/fmm/python/build
$ python
Python 2.7.16 (default, Mar 20 2019, 12:15:19)
[GCC 7.4.0] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import fmm
>>> import fiona
>>>
also working:
XXX+dmolitor@XXX ~/fmm/python/build
$ python
Python 2.7.16 (default, Mar 20 2019, 12:15:19)
[GCC 7.4.0] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> import fmm
>>>
XXX+dmolitor@XXX ~/fmm/python/build
$ python
Python 2.7.16 (default, Mar 20 2019, 12:15:19)
[GCC 7.4.0] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import fmm
>>> import sys
>>>
Maybe you can run this one to check the library used
ldd _fmm.dll
Maybe you can run this one to check the library used
ldd _fmm.dll
@cyang-kth is there something that seems not right here?
XXX+dmolitor@XXX ~/fmm/python/build
$ ldd _fmm.dll
ntdll.dll => /cygdrive/c/Windows/SYSTEM32/ntdll.dll (0x7ff814de0000)
KERNEL32.DLL => /cygdrive/c/Windows/system32/KERNEL32.DLL (0x7ff813f20000)
KERNELBASE.dll => /cygdrive/c/Windows/system32/KERNELBASE.dll (0x7ff812090000)
cygwin1.dll => /usr/bin/cygwin1.dll (0x180040000)
cyggcc_s-seh-1.dll => /usr/bin/cyggcc_s-seh-1.dll (0x3fd330000)
cygstdc++-6.dll => /usr/bin/cygstdc++-6.dll (0x3edd90000)
libpython2.7.dll => /usr/bin/libpython2.7.dll (0x3ed680000)
cygpyfmm.dll => /home/dmolitor/fmm/python/build/cygpyfmm.dll (0x5ff360000)
cygboost_serialization-1_66.dll => /usr/bin/cygboost_serialization-1_66.dll (0x3fe910000)
cyggdal-26.dll => /usr/bin/cyggdal-26.dll (0x3fc3f0000)
cygcfitsio-7.dll => /usr/bin/cygcfitsio-7.dll (0x3fddb0000)
cygcrypto-1.1.dll => /usr/bin/cygcrypto-1.1.dll (0x3fd860000)
cygcurl-4.dll => /usr/bin/cygcurl-4.dll (0x3fd7c0000)
cygexpat-1.dll => /usr/bin/cygexpat-1.dll (0x3fd4e0000)
cyggeos_c-1.dll => /usr/bin/cyggeos_c-1.dll (0x3fbf20000)
cyggeotiff-5.dll => /usr/bin/cyggeotiff-5.dll (0x3fbef0000)
cyggif-7.dll => /usr/bin/cyggif-7.dll (0x3fbed0000)
cyghdf5-103.dll => /usr/bin/cyghdf5-103.dll (0x3faed0000)
cygiconv-2.dll => /usr/bin/cygiconv-2.dll (0x3fad30000)
cygjpeg-8.dll => /usr/bin/cygjpeg-8.dll (0x3ef4a0000)
cygjson-c-2.dll => /usr/bin/cygjson-c-2.dll (0x3ef480000)
cygnetcdf-15.dll => /usr/bin/cygnetcdf-15.dll (0x3eeea0000)
cygopenjp2-7.dll => /usr/bin/cygopenjp2-7.dll (0x3eed90000)
cygpcre-1.dll => /usr/bin/cygpcre-1.dll (0x3eebf0000)
cygpng16-16.dll => /usr/bin/cygpng16-16.dll (0x3ee810000)
cygpq-5.dll => /usr/bin/cygpq-5.dll (0x3ee7a0000)
cygproj-15.dll => /usr/bin/cygproj-15.dll (0x3ee500000)
cygqhull-7.dll => /usr/bin/cygqhull-7.dll (0x3ee470000)
cygsqlite3-0.dll => /usr/bin/cygsqlite3-0.dll (0x3ee0d0000)
cygtiff-6.dll => /usr/bin/cygtiff-6.dll (0x3edcd0000)
cygwebp-7.dll => /usr/bin/cygwebp-7.dll (0x3eda70000)
cygxml2-2.dll => /usr/bin/cygxml2-2.dll (0x3ed930000)
cygz.dll => /usr/bin/cygz.dll (0x3ed910000)
ODBC32.dll => /cygdrive/c/Windows/SYSTEM32/ODBC32.dll (0x7fffef5d0000)
ODBCCP32.dll => /cygdrive/c/Windows/SYSTEM32/ODBCCP32.dll (0x7ffff0b60000)
WS2_32.dll => /cygdrive/c/Windows/system32/WS2_32.dll (0x7ff814530000)
cygbz2-1.dll => /usr/bin/cygbz2-1.dll (0x3fe0c0000)
cygbrotlidec-1.dll => /usr/bin/cygbrotlidec-1.dll (0x3fe0e0000)
cyggssapi_krb5-2.dll => /usr/bin/cyggssapi_krb5-2.dll (0x3fb950000)
cygidn2-0.dll => /usr/bin/cygidn2-0.dll (0x3ef840000)
cyglber-2-4-2.dll => /usr/bin/cyglber-2-4-2.dll (0x3ef2f0000)
cygldap-2-4-2.dll => /usr/bin/cygldap-2-4-2.dll (0x3ef2a0000)
cygnghttp2-14.dll => /usr/bin/cygnghttp2-14.dll (0x3eedf0000)
cygpsl-5.dll => /usr/bin/cygpsl-5.dll (0x3ee4e0000)
cygssh-4.dll => /usr/bin/cygssh-4.dll (0x3ee050000)
cygssl-1.1.dll => /usr/bin/cygssl-1.1.dll (0x3edf50000)
cyggeos-3-8-0.dll => /usr/bin/cyggeos-3-8-0.dll (0x3fbf60000)
cyghdf5_hl-100.dll => /usr/bin/cyghdf5_hl-100.dll (0x3faea0000)
cygintl-8.dll => /usr/bin/cygintl-8.dll (0x3ef820000)
cygldap_r-2-4-2.dll => /usr/bin/cygldap_r-2-4-2.dll (0x3ef250000)
cygjbig-2.dll => /usr/bin/cygjbig-2.dll (0x3ef520000)
cyglzma-5.dll => /usr/bin/cyglzma-5.dll (0x3ef1e0000)
msvcrt.dll => /cygdrive/c/Windows/system32/msvcrt.dll (0x7ff814a20000)
ADVAPI32.dll => /cygdrive/c/Windows/system32/ADVAPI32.dll (0x7ff814760000)
USER32.dll => /cygdrive/c/Windows/system32/USER32.dll (0x7ff812650000)
VERSION.dll => /cygdrive/c/Windows/SYSTEM32/VERSION.dll (0x7ff80c030000)
NSI.dll => /cygdrive/c/Windows/system32/NSI.dll (0x7ff814c20000)
RPCRT4.dll => /cygdrive/c/Windows/system32/RPCRT4.dll (0x7ff814ae0000)
cygbrotlicommon-1.dll => /usr/bin/cygbrotlicommon-1.dll (0x3fe100000)
cygk5crypto-3.dll => /usr/bin/cygk5crypto-3.dll (0x3ef400000)
cygkrb5-3.dll => /usr/bin/cygkrb5-3.dll (0x3ef330000)
cygkrb5support-0.dll => /usr/bin/cygkrb5support-0.dll (0x3ef310000)
cygcom_err-2.dll => /usr/bin/cygcom_err-2.dll (0x3fdda0000)
cygunistring-2.dll => /usr/bin/cygunistring-2.dll (0x3edb20000)
cygsasl2-3.dll => /usr/bin/cygsasl2-3.dll (0x3ee280000)
sechost.dll => /cygdrive/c/Windows/SYSTEM32/sechost.dll (0x7ff8142d0000)
GDI32.dll => /cygdrive/c/Windows/system32/GDI32.dll (0x7ff8140c0000)
SspiCli.dll => /cygdrive/c/Windows/system32/SspiCli.dll (0x7ff812440000)
CRYPTBASE.DLL => /cygdrive/c/Windows/system32/CRYPTBASE.DLL (0x7ff811e80000)
bcryptPrimitives.dll => /cygdrive/c/Windows/system32/bcryptPrimitives.dll (0x7ff811d10000)
IMM32.DLL => /cygdrive/c/Windows/system32/IMM32.DLL (0x7ff812610000)
MSCTF.dll => /cygdrive/c/Windows/system32/MSCTF.dll (0x7ff8127d0000)
This problem is also mentioned here https://github.com/cyang-kth/fmm/issues/58, which is not solved. It is a common issue for the Windows system. I did not have a Window computer at hand to test the installation. Perhaps I will do it in the near future.
https://stackoverflow.com/questions/5208845/setting-ld-library-path-in-cygwin
This problem is also mentioned here #58, which is not solved. It is a common issue for the Windows system. I did not have a Window computer at hand to test the installation. Perhaps I will do it in the near future.
Thank you again for the quick response! Seems to be the exact same issue! Interestingly the fmm Version from 31.01.2020 didn't have that issue.
One difference is that the command swig_add_module (which is deprecated by cmake) is replaced with swig_add_library.
I am not sure if it is the reason for this issue.
I test with this program on cygwin on a virtual machine provided by appveyor. The issue exists and even c++ program cannot be run properly. So I think it may be related with some issue of cygwin and currently we should exclude windows as a platform. In the future, it is better to deploy directly in Visual studio.
I test with this program on cygwin on a virtual machine provided by appveyor. The issue exists and even c++ program cannot be run properly. So I think it may be related with some issue of cygwin and currently we should exclude windows as a platform. In the future, it is better to deploy directly in Visual studio.
I'm was taking the workaround working within the fmm/python/build folder which worked flawlessly. Though too bad to hear the 'wontfix'
@davmol Some other users report that it does not work even inside that folder. I have opened another issue #87. It may be more reliable to directly build the program with visual studio on Windows.
@davmol Some other users report that it does not work even inside that folder. I have opened another issue #87. It may be more reliable to directly build the program with visual studio on Windows.
Me myself, I can't relate to that. fmm import is working with python2 and python3 within that folder. But yes, I agree a native windows environment would be preferable.
@davmol I have deployed it successfully on appveyor https://ci.appveyor.com/project/cyang-kth/fmm. Thanks to @zhangwei0402 suggestion.
I am not sure if the issue she discovered is relevant to yours. In the latest version (directly support of reading OSM file is added), the building of Python and c++ are both placed in the build
folder where python library is placed at build/python
.
By adding both build
to PATH
variable and build/python
to PYTHONPATH
now the import fmm
can be run successfully.
At least it successfully runs on the virtual machine of Appveyor now I am a bit more confident about the deployment on Windows.
Hello, I'm having trouble using the current versions python API. Im using Cygwin under Windows and I'm getting the following ImportError:
Is there anything I could have missed during the installation?