Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numpy version mismatch in the first try #49

Closed
mahmoodn opened this issue Apr 2, 2021 · 3 comments
Closed

Numpy version mismatch in the first try #49

mahmoodn opened this issue Apr 2, 2021 · 3 comments

Comments

@mahmoodn
Copy link

mahmoodn commented Apr 2, 2021

Hi
I have successfully installed tensorflow and tf-quant-finance from source, however, when I want to run an example, I get an error about version mismatch of numpy.

$ python3 American_Option_Black_Scholes.py
2021-04-02 08:52:17.384836: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd
Traceback (most recent call last):
  File "American_Option_Black_Scholes.py", line 8, in <module>
    import tensorflow as tf
  File "/home/mnaderan/.local/lib/python3.8/site-packages/tensorflow/__init__.py", line 41, in <module>
    from tensorflow.python.tools import module_util as _module_util
  File "/home/mnaderan/.local/lib/python3.8/site-packages/tensorflow/python/__init__.py", line 40, in <module>
    from tensorflow.python.eager import context
  File "/home/mnaderan/.local/lib/python3.8/site-packages/tensorflow/python/eager/context.py", line 37, in <module>
    from tensorflow.python.client import pywrap_tf_session
  File "/home/mnaderan/.local/lib/python3.8/site-packages/tensorflow/python/client/pywrap_tf_session.py", line 23, in <module>
    from tensorflow.python._pywrap_tf_session import *
ImportError: SystemError: <built-in method __contains__ of dict object at 0x7f4c43c1d600> returned a result with an error set

The versions are shown below

$ pip3 list | grep numpy
numpy                   1.19.5
$ pip3 list | grep tensor
tensorboard             2.4.1
tensorboard-plugin-wit  1.8.0
tensorflow              2.6.0
tensorflow-estimator    2.4.0
tensorflow-probability  0.12.1
$ pip3 list | grep quant
tf-quant-finance        0.0.1.dev25

How can I fix that?

@cyrilchim
Copy link
Contributor

Hi Mahmood,

Sorry for the late reply. Could you please clarify how and which example you run?

@mahmoodn
Copy link
Author

It seems that there is an incompatibility between tensorflow and numpy 1.20 at the moment.
tensorflow/tensorflow#48271

@cyrilchim
Copy link
Contributor

Closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants