pyhawkes icon indicating copy to clipboard operation
pyhawkes copied to clipboard

Make PyHawkes installable on Windows

Open Caijiawen opened this issue 7 years ago • 6 comments

when i use

python setup.py build_ext --inplace

to install this package , error happens and the main part is :

writing build\temp.win-amd64-2.7\Release\pyhawkes\internals\continuous_time_helpers.def c:\Rtools\mingw_32\bin\gcc.exe -DMS_WIN64 -shared -s build\temp.win-amd64-2.7\Release\pyhawkes\internals\continuous_time_helpers.o build\temp.win-amd64-2.7\Release\pyhawkes\internals\continuous_time_helpers.def -LC:\Users\hp\Anaconda2\libs -LC:\Users\hp\Anaconda2\PCbuild\amd64 -LC:\Users\hp\Anaconda2\PC\VS9.0\amd64 -lpython27 -lmsvcr90 -o C:\Users\hp\Desktop\pyhawkes-master\pyhawkes-master\pyhawkes\internals\continuous_time_helpers.pyd -fopenmp C:\Users\hp\Anaconda2\libs/libpython27.dll.a: error adding symbols: File format not recognized collect2.exe: error: ld returned 1 exit status error: command 'c:\Rtools\mingw_32\bin\gcc.exe' failed with exit status 1

how can i solve this problem?

Caijiawen avatar Mar 14 '17 03:03 Caijiawen

There are number of prerequisites/requirements before you run this. I do not know whether Anaconda does give you all. Do check that once.

jayeshchoudhari avatar Mar 27 '17 05:03 jayeshchoudhari

Thanks for raising this issue. Unfortunately I haven't done any testing on Windows. One of the first issues will be handling the GSL dependency.

I'm going to work on cleaning up the installation process by making the dependence on GSL and OpenMP optional, but that will take some time. I've opened a new issue to track this: https://github.com/slinderman/pyhawkes/issues/10

slinderman avatar Mar 27 '17 18:03 slinderman

Hi @Caijiawen, I've updated the PyHawkes installation procedure so that at least the default, single-threaded version should run on Windows. It does, however, still rely on Cython, so that may pose some problems. Can you please give pip install pyhawkes or python setup.py install (on the latest from master) a shot and see if it works for you? If not, I can also make Cython optional by shipping the source files.

slinderman avatar Mar 28 '17 00:03 slinderman

Hi @slinderman ,

I had to specify the use of VisualC++14 installer instead of GCC on windows, but everything went fine when running the following from terminal, for both pyhawkes and pybasicbayes:

pip3.5 install --global-option build_ext --global-option --compiler=msvc pyhawkes

Thanks for your great work on that package!

Yoln1 avatar May 10 '17 16:05 Yoln1

I can do this,just by: python setup.py build

image

ScottishFold007 avatar Oct 20 '19 02:10 ScottishFold007