smousavi05 / EQTransformer

EQTransformer, a python package for earthquake signal detection and phase picking using AI.
https://rebrand.ly/EQT-documentations
MIT License
314 stars 149 forks source link

Compatibility issue between Tensorflow 2.x and Numpy 1.20 #99

Closed alirezaniki closed 2 years ago

alirezaniki commented 3 years ago

Hi there,

I am trying to install the EQTransformer package on a Compute Canada Machine (Siku) but the example codes run into errors cause of compatibility issues between Tensorflow 2.5 and Numpy 1.20 (https://github.com/tensorflow/tensorflow/issues). I tried to reinstall the Numpy and used different versions of it but at some other points, it fails again. I also asked the CC support team for help and they said that the requirement needed in EQTransformer is not a working configuration of programs. Any suggestions for an optimal configuration to resolve the issue?

smousavi05 commented 3 years ago

Hi @alirezaniki could you try the EqT version on the github page. That is slightly different than the one on pip or anaconda

alirezaniki commented 3 years ago

Thank you @smousavi05 for your reply. I've installed the EQT from the source as you suggested. Though, still, there is a mismatch between the given Numpy (1.20.3) and TensorFlow (2.5.1) versions. I've changed the Numpy version in setup.py to 1.19.12 to make it work. One more question here! Is there any way to install the EQT from the source package locally? Because in Compute Canada I haven't the required privilege to put stuff in /root and I have to install packages locally (like passing --prefix=./some/where/in/here/).

smousavi05 commented 3 years ago

@alirezaniki I haven't try that so don't know

ostueker commented 2 years ago

The install_requirements in setup.py are clearly broken.

    'numpy==1.20.3',
    'keyring>=15.1', 
    'pkginfo>=1.4.2',
    'scipy==1.4.1', 
    'tensorflow==2.5.2', 

Tensorflow 2.5.2 is incompatible with numpy==1.20.3 and support for numpy>=1.20.x has only been added in TensorFlow 2.7.0:

I also recommend not pinning exact versions, but rather defining minimum and/or maximum versions.

smousavi05 commented 2 years ago

thanks Oliver

On Mon, Jan 31, 2022 at 2:38 PM Oliver Stueker @.***> wrote:

The install_requirements in setup.py are clearly broken.

'numpy==1.20.3', 'keyring>=15.1', 'pkginfo>=1.4.2', 'scipy==1.4.1', 'tensorflow==2.5.2',

Tensorflow 2.5.2 is incompatible with numpy==1.20.3 and support for numpy>=1.20.x has only been added in TensorFlow 2.7.0.

I also recommend not pinning exact versions, but rather defining minimum and/or maximum versions.

— Reply to this email directly, view it on GitHub https://github.com/smousavi05/EQTransformer/issues/99#issuecomment-1026282560, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADHWAPH4OQR3IJKFHBOQNPTUY4FNLANCNFSM5G2YTQ6A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you modified the open/close state.Message ID: @.***>

ostueker commented 2 years ago

I've opened a PR.