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

Unable to install due to numpy==1.19.4 #333

Closed
thompsonalecbgo opened this issue Nov 14, 2020 · 7 comments
Closed

Unable to install due to numpy==1.19.4 #333

thompsonalecbgo opened this issue Nov 14, 2020 · 7 comments

Comments

@thompsonalecbgo
Copy link

thompsonalecbgo commented Nov 14, 2020

Hi I am unable to use gradient on python 3.7.9 due to RuntimeError caused by numpy==1.19.4

RuntimeError: The current Numpy installation ('c:\users\XXXX\envs\gradient\lib\site-packages\numpy\init.py') fails to pass a sanity check due to a bug in the windows runtime. See this issue for more information: https://tinyurl.com/y3dm3h86

I tried downgrading the numpy, but it appears to be incompatible and i got the ff ModuleNotFoundError:
ModuleNotFoundError: No module named '_curses'

@lborke
Copy link

lborke commented Nov 14, 2020

I have had this issue a few days before.

See also https://developercommunity.visualstudio.com/content/problem/1207405/fmod-after-an-update-to-windows-2004-is-causing-a.html

The best current solution under Win (Version 2004) is:

pip uninstall numpy

then

pip install numpy==1.19.3

Best

@lborke
Copy link

lborke commented Nov 14, 2020

PS:
I am not using numpy together with gradient-cli.
My suggestion addresses only the numpy issue.

One solution for gradient-cli (+ numpy) would be using Docker/Hyper-V under Windows to have a native Linux system...

@sanfilip
Copy link
Contributor

sanfilip commented Dec 7, 2020

@weikaolun @lamroger I am still able to repo this issue with the latest gradient-cli which pulls in gradient-utils-0.3.1
tensoflow-2.3.1 which is the latest, is not compatible due to the numpy conflict. Seems like we should downgrade gradient-utils to numpy 1.18.5 at least. Also note there is a conflict with hyperopt

Steps to repro:

on macos:
which python3
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3
python3 --version
Python 3.7.3
python3 -m venv venv
source venv/bin/activate
pip install gradient
pip install tensorflow
...
(error:)
gradient-utils 0.3.1 has requirement numpy==1.19.3, but you'll have numpy 1.18.5 which is incompatible.

Also gradient-sdk is no longer compatible with gradient-utils; we need to revise samples to account for this.

@sanfilip
Copy link
Contributor

sanfilip commented Dec 7, 2020

@weikaolun @lamroger
This fails for any version of tensorflow, 1.15, 2.x

@Paulj1989
Copy link

I've had similar issues when trying to install gradient. I'm trying to install in a pipenv, and it produces a resolution failure when resolving dependencies.

The error it returns is as follows:

ERROR: Could not find a version that matches numpy==1.18.5,==1.19.3,>=1.12.0,>=1.13.0,>=1.13.3,>=1.14.5,>=1.15,>=1.15.4,>=1.7,>=1.9.1,~=1.19.2

And the incompatible versions:

There are incompatible versions in the resolved dependencies:
  numpy==1.19.3 (from -r /tmp/pipenvn4iqexjvrequirements/pipenv-5gja4g8i-constraints.txt (line 6))
  numpy==1.18.5 (from gradient-utils==0.3.2->gradient==1.3.0->-r /tmp/pipenvn4iqexjvrequirements/pipenv-5gja4g8i-constraints.txt (line 10))
  numpy>=1.12.0 (from tensorboard==2.4.0->tensorflow==2.4.0->-r /tmp/pipenvn4iqexjvrequirements/pipenv-5gja4g8i-constraints.txt (line 15))
  numpy>=1.12.0 (from tensorflow-hub==0.10.0->-r /tmp/pipenvn4iqexjvrequirements/pipenv-5gja4g8i-constraints.txt (line 2))
  numpy>=1.13.0 (from yellowbrick==1.2->-r /tmp/pipenvn4iqexjvrequirements/pipenv-5gja4g8i-constraints.txt (line 7))
  numpy>=1.13.3 (from scikit-learn==0.23.2->sklearn==0.0->-r /tmp/pipenvn4iqexjvrequirements/pipenv-5gja4g8i-constraints.txt (line 13))
  numpy>=1.14.5 (from scipy==1.5.4->keras==2.4.3->-r /tmp/pipenvn4iqexjvrequirements/pipenv-5gja4g8i-constraints.txt (line 12))
  numpy>=1.15 (from matplotlib==3.3.3->-r /tmp/pipenvn4iqexjvrequirements/pipenv-5gja4g8i-constraints.txt (line 4))
  numpy>=1.15 (from seaborn==0.11.0->-r /tmp/pipenvn4iqexjvrequirements/pipenv-5gja4g8i-constraints.txt (line 11))
  numpy>=1.15.4 (from pandas==1.1.5->-r /tmp/pipenvn4iqexjvrequirements/pipenv-5gja4g8i-constraints.txt (line 14))
  numpy>=1.7 (from h5py==2.10.0->keras==2.4.3->-r /tmp/pipenvn4iqexjvrequirements/pipenv-5gja4g8i-constraints.txt (line 12))
  numpy>=1.7 (from opt-einsum==3.3.0->tensorflow==2.4.0->-r /tmp/pipenvn4iqexjvrequirements/pipenv-5gja4g8i-constraints.txt (line 15))
  numpy>=1.9.1 (from keras-preprocessing==1.1.2->tensorflow==2.4.0->-r /tmp/pipenvn4iqexjvrequirements/pipenv-5gja4g8i-constraints.txt (line 15))
  numpy>=1.9.1 (from keras==2.4.3->-r /tmp/pipenvn4iqexjvrequirements/pipenv-5gja4g8i-constraints.txt (line 12))
  numpy~=1.19.2 (from tensorflow==2.4.0->-r /tmp/pipenvn4iqexjvrequirements/pipenv-5gja4g8i-constraints.txt (line 15))

Has anyone found a resolution?

@lamroger
Copy link
Contributor

I've had similar issues when trying to install gradient. I'm trying to install in a pipenv, and it produces a resolution failure when resolving dependencies.

The error it returns is as follows:

ERROR: Could not find a version that matches numpy==1.18.5,==1.19.3,>=1.12.0,>=1.13.0,>=1.13.3,>=1.14.5,>=1.15,>=1.15.4,>=1.7,>=1.9.1,~=1.19.2

And the incompatible versions:

There are incompatible versions in the resolved dependencies:
  numpy==1.19.3 (from -r /tmp/pipenvn4iqexjvrequirements/pipenv-5gja4g8i-constraints.txt (line 6))
  numpy==1.18.5 (from gradient-utils==0.3.2->gradient==1.3.0->-r /tmp/pipenvn4iqexjvrequirements/pipenv-5gja4g8i-constraints.txt (line 10))
  numpy>=1.12.0 (from tensorboard==2.4.0->tensorflow==2.4.0->-r /tmp/pipenvn4iqexjvrequirements/pipenv-5gja4g8i-constraints.txt (line 15))
  numpy>=1.12.0 (from tensorflow-hub==0.10.0->-r /tmp/pipenvn4iqexjvrequirements/pipenv-5gja4g8i-constraints.txt (line 2))
  numpy>=1.13.0 (from yellowbrick==1.2->-r /tmp/pipenvn4iqexjvrequirements/pipenv-5gja4g8i-constraints.txt (line 7))
  numpy>=1.13.3 (from scikit-learn==0.23.2->sklearn==0.0->-r /tmp/pipenvn4iqexjvrequirements/pipenv-5gja4g8i-constraints.txt (line 13))
  numpy>=1.14.5 (from scipy==1.5.4->keras==2.4.3->-r /tmp/pipenvn4iqexjvrequirements/pipenv-5gja4g8i-constraints.txt (line 12))
  numpy>=1.15 (from matplotlib==3.3.3->-r /tmp/pipenvn4iqexjvrequirements/pipenv-5gja4g8i-constraints.txt (line 4))
  numpy>=1.15 (from seaborn==0.11.0->-r /tmp/pipenvn4iqexjvrequirements/pipenv-5gja4g8i-constraints.txt (line 11))
  numpy>=1.15.4 (from pandas==1.1.5->-r /tmp/pipenvn4iqexjvrequirements/pipenv-5gja4g8i-constraints.txt (line 14))
  numpy>=1.7 (from h5py==2.10.0->keras==2.4.3->-r /tmp/pipenvn4iqexjvrequirements/pipenv-5gja4g8i-constraints.txt (line 12))
  numpy>=1.7 (from opt-einsum==3.3.0->tensorflow==2.4.0->-r /tmp/pipenvn4iqexjvrequirements/pipenv-5gja4g8i-constraints.txt (line 15))
  numpy>=1.9.1 (from keras-preprocessing==1.1.2->tensorflow==2.4.0->-r /tmp/pipenvn4iqexjvrequirements/pipenv-5gja4g8i-constraints.txt (line 15))
  numpy>=1.9.1 (from keras==2.4.3->-r /tmp/pipenvn4iqexjvrequirements/pipenv-5gja4g8i-constraints.txt (line 12))
  numpy~=1.19.2 (from tensorflow==2.4.0->-r /tmp/pipenvn4iqexjvrequirements/pipenv-5gja4g8i-constraints.txt (line 15))

Has anyone found a resolution?

Hi @Paulj1989, would you be able to use tensorflow 2.3.1 instead? We pinned numpy to 1.18.5 in gradient-utils to resolve the above issues and tensorflow 2.3.1 should be compatible.

@Paulj1989
Copy link

Hi @Paulj1989, would you be able to use tensorflow 2.3.1 instead? We pinned numpy to 1.18.5 in gradient-utils to resolve the above issues and tensorflow 2.3.1 should be compatible.

Success! Thanks for your help.

@lamroger lamroger closed this as completed Oct 4, 2021
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

5 participants