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

1.13.0rc1 requires numpy >=1.16.0 instead of >=1.13.3 stated in setup.py in r1.13 branch??? #25636

Closed
henrysky opened this issue Feb 9, 2019 · 13 comments
Assignees
Labels
TF 1.13 Issues related to TF 1.13 type:build/install Build and install issues type:docs-bug Document issues

Comments

@henrysky
Copy link

henrysky commented Feb 9, 2019

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10 x64
  • Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: N/A
  • TensorFlow installed from (source or binary): Binary
  • TensorFlow version: 1.13.0rc1
  • Python version: 3.7.1
  • Installed using virtualenv? pip? conda?: pip
  • Bazel version (if compiling from source): N/A
  • GCC/Compiler version (if compiling from source): N/A
  • CUDA/cuDNN version: 10 / 7.4.2
  • GPU model and memory: MX150 2GB

Describe the problem
Tensorflow 1.13.0rc1 said the numpy requires >=1.13.3 (I had np 1.15.4) in setup.py but it only works with >=1.16.0. Either the setup.py is wrong or there is something wrong while building the wheel??

Provide the exact sequence of commands / steps that you executed before running into the problem

import tensorflow

Any other info / logs

PyBfloat16_Type.tp_base != nullptr
@jvishnuvardhan jvishnuvardhan self-assigned this Feb 9, 2019
@jvishnuvardhan jvishnuvardhan added type:docs-bug Document issues type:build/install Build and install issues subtype:windows Windows Build/Installation Issues TF 1.13 Issues related to TF 1.13 labels Feb 9, 2019
@jvishnuvardhan jvishnuvardhan added the stat:awaiting tensorflower Status - Awaiting response from tensorflower label Feb 9, 2019
@jvishnuvardhan
Copy link
Contributor

Sorry for the delay in resolving the issue @henrysky. Could you check whether this is an issue with the latest TF? Thanks!

@jvishnuvardhan jvishnuvardhan assigned gunan and unassigned MarkDaoust Mar 3, 2019
@jvishnuvardhan
Copy link
Contributor

In some cases, I think there are compatibility issues between modules when you install TF using conda. Could you uninstall python and tensorflow and reinstall following the instructions here. Please let me know how it progresses. Thanks!

@henrysky
Copy link
Author

henrysky commented Mar 3, 2019

I follow the instruction to use official python builds instead of conda in a VM.

For python 3.6 and 3.7 I have tested, the error still the same when using numpy 1.15, but gone when using numpy 1.16

@jvishnuvardhan
Copy link
Contributor

@henrysky Please check required packages here for TF1.13.1. In future, double check version of required packages before you install TF through Anaconda. Thanks!

REQUIRED_PACKAGES = [
'absl-py >= 0.7.0',
'astor >= 0.6.0',
'gast >= 0.2.0',
'google_pasta >= 0.1.2',
'keras_applications >= 1.0.6',
'keras_preprocessing >= 1.0.5',
'numpy >= 1.14.5, < 2.0',
'six >= 1.10.0',
'protobuf >= 3.6.1',
'tensorboard >= 1.13.0, < 1.14.0',
'tensorflow_estimator >= 1.13.0rc0, < 1.14.0rc0',
'termcolor >= 1.1.0',
]

@henrysky
Copy link
Author

henrysky commented Mar 4, 2019

This is a clean windows 10 in VM. Using python instead of anaconda python

numpy 1.15.4 which tensorflow failed
image

numpy 1.16.2 which tensorflow okay
image

@henrysky
Copy link
Author

henrysky commented Mar 7, 2019

@jvishnuvardhan I check with the latest tensorflow 2.0.0a0 same issue is there too

@combacsa
Copy link

In [1]: import numpy

In [2]: numpy.version
Out[2]: <module 'numpy.version' from '/Users/khbyun/anaconda3/envs/w4/lib/python3.6/site-packages/numpy/version.py'>

In [3]: numpy.version.version
Out[3]: '1.15.1'

In [4]: import tensorflow
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
ImportError: numpy.core.multiarray failed to import

The above exception was the direct cause of the following exception:

SystemError                               Traceback (most recent call last)
~/anaconda3/envs/w4/lib/python3.6/importlib/_bootstrap.py in _find_and_load(name, import_)

SystemError: <class '_frozen_importlib._ModuleLockManager'> returned a result with an error set
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
ImportError: numpy.core._multiarray_umath failed to import
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
ImportError: numpy.core.umath failed to import
2019-03-19 16:46:12.380357: F tensorflow/python/lib/core/bfloat16.cc:675] Check failed: PyBfloat16_Type.tp_base != nullptr
Abort trap: 6

According to numpy issue 11871, tensorflow >= 1.13 should depends on numpy >= 1.16 ...

numpy/numpy#11871

@combacsa
Copy link

It happens on macOS, too. Not only on windows.

@facaiy facaiy removed the subtype:windows Windows Build/Installation Issues label Mar 19, 2019
@facaiy
Copy link
Member

facaiy commented Mar 19, 2019

@av8ramit Hi, Amit. Do you know the problem?

@tensorflowbutler tensorflowbutler removed the stat:awaiting tensorflower Status - Awaiting response from tensorflower label Mar 19, 2019
@ctmckee
Copy link

ctmckee commented Mar 27, 2019

The "ModuleNotFoundError: No module name 'numpy.core._multiarray_umath' occurs when trying to use tensorflowjs_converter

@Yilong94
Copy link

I can confirm that the error is still occuring. numpy==1.15.4 is not compatible with tensorflow==1.13.1, despite tensorflow v1.13.1 requiring only numpy>=1.13.3

@mihaimaruseac
Copy link
Collaborator

Going to fix this in 1.13 (with upcoming patch release), 1.14 (with upcoming patch release) and master (for new releases)

@mihaimaruseac
Copy link
Collaborator

Also notes that there is a workaround where you install numpy before tnesorflow or with the constraint at the same time as tensorflow: pip install numpy && pip install tensorflow or pip install numpy >= 1.16 tensorflow == 1.13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TF 1.13 Issues related to TF 1.13 type:build/install Build and install issues type:docs-bug Document issues
Projects
None yet
Development

No branches or pull requests

10 participants