holgern / pyedflib

pyedflib is a python library to read/write EDF+/BDF+ files based on EDFlib.
http://pyedflib.readthedocs.org/
BSD 3-Clause "New" or "Revised" License
209 stars 121 forks source link

installation #185

Closed betty6you closed 1 year ago

betty6you commented 1 year ago

Hi, I am using pyedflib with spikeinterface to extract edf file info. I am using a python 3.9 version. Do I need a C complier and cython to install the package?

Or directly run the code: conda install -c conda-forge pyedflib

Which is easier for me as I am a beginner in Python.

Thanks

betty6you commented 1 year ago

when I use conda install -c conda-forge pyedflib to install it under conda environment

it has a file named _pyedflib.cp39-win_amd64.pyd in extesions folder.

But I didn't see the three files: _pyedflib.pyx, c_edf.pxd, edf.pxi in the folder.

Is my installation wrong? Thanks.

skjerns commented 1 year ago

Have you tried installing via pip? That should work

'pip install pyedflib'

betty6you commented 1 year ago

I tried, same condition, only has a file named _pyedflib.cp39-win_amd64.pyd in extesions folder.

But I didn't see the three files: _pyedflib.pyx, c_edf.pxd, edf.pxi in the folder.

betty6you commented 1 year ago

Is this normal? Or I should see the other three files before using the pyedflib?

betty6you commented 1 year ago

https://github.com/betty6you/EDFRecordingExtractor/blob/main/EDF_extractor_test.ipynb Please see my code, it keeps giving me 'the file has already been open' error code.

I don't know which part of my code is wrong.

skjerns commented 1 year ago

Is this normal? Or I should see the other three files before using the pyedflib?

seems like your installation is just working fine!

https://github.com/betty6you/EDFRecordingExtractor/blob/main/EDF_extractor_test.ipynb Please see my code, it keeps giving me 'the file has already been open' error code.

I don't know which part of my code is wrong.

Probably because you open the file before and do not close it (maybe with recording=se.EDFRecordingExtractor(recording_file, stream_id=None, stream_name=None, all_annotations=False)?). Any EDF file can only be opened once at the same time. I don't think this is related to pyedflib itself, you should probably talk to the authors of the libraries that are using pyedflib.