numpy version issue while installing via pip

See original GitHub issue

Ubuntu 16.04.6 LTS, Python 3.7.3 (pyenv).

Using pip install gluonts in a clean environment will get version conflict error about. It will try to install numpy 1.16.4 first:

Collecting numpy>=1.14.0 (from gluonts)
  Downloading https://files.pythonhosted.org/packages/fc/d1/45be1144b03b6b1e24f9a924f23f66b4ad030d834ad31fb9e5581bd328af/numpy-1.16.4-cp37-cp37m-manylinux1_x86_64.whl (17.3MB)

And later mxnet gives version conflict error:

ERROR: mxnet 1.4.1 has requirement numpy<1.15.0,>=1.8.2, but you'll have numpy 1.16.4 which is incompatible.

Workaround is to run pip install mxnet after pip install gluonts to let pip downupgrade numpy:

$ pip install mxnet
Requirement already satisfied: mxnet in ./.pyenv/versions/3.7.3/lib/python3.7/site-packages (1.4.1)
Requirement already satisfied: requests>=2.20.0 in ./.pyenv/versions/3.7.3/lib/python3.7/site-packages (from mxnet) (2.22.0)
Collecting numpy<1.15.0,>=1.8.2 (from mxnet)
  Downloading https://files.pythonhosted.org/packages/18/84/49b7f268741119328aeee0802aafb9bc2e164b36fc312daf83af95dae646/numpy-1.14.6-cp37-cp37m-manylinux1_x86_64.whl (13.8MB)
     |████████████████████████████████| 13.8MB 13.5MB/s
Requirement already satisfied: graphviz<0.9.0,>=0.8.1 in ./.pyenv/versions/3.7.3/lib/python3.7/site-packages (from mxnet) (0.8.4)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in ./.pyenv/versions/3.7.3/lib/python3.7/site-packages (from requests>=2.20.0->mxnet) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in ./.pyenv/versions/3.7.3/lib/python3.7/site-packages (from requests>=2.20.0->mxnet) (2019.3.9)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in ./.pyenv/versions/3.7.3/lib/python3.7/site-packages (from requests>=2.20.0->mxnet) (1.25.3)
Requirement already satisfied: idna<2.9,>=2.5 in ./.pyenv/versions/3.7.3/lib/python3.7/site-packages (from requests>=2.20.0->mxnet) (2.8)
Installing collected packages: numpy
  Found existing installation: numpy 1.16.4
    Uninstalling numpy-1.16.4:
      Successfully uninstalled numpy-1.16.4
Successfully installed numpy-1.14.6

If it’s not easy to fix, maybe add some instructions into README.md.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
whyxiangcommented, Jul 26, 2019

@gslin thanks for reporting this, we’ve fixed the NumPy version and the problem should not occur on the next tagged release.

@lostella hello, gluonts python package was just updated on July 23, seems this numpy version problem is still here.

0reactions
whyxiangcommented, Jul 29, 2019

@aalexandrov Hello Alex,

  1. Yes, the only solution at this moment is to downgrade catboost with numpy==0.14, and it works. I am just wondering whether it is possible to have gluonts and mxnet compatible with latest version of numpy in the future so there would not be any conflict between the latestest version of mxnet, gluonts and other py packages.

  2. the installation cannot be completed, the warning message is the only thing shows up, no error message. This happens after me manually editing requirement.txt to numpy >=1.14.*.

Anyway, this problem is solved, thanks for help 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

pip fails to install numpy error code 1 - Stack Overflow
Install Miniconda and then go to a command-line and type conda install numpy (make sure your PATH includes the location conda was installed...
Read more >
error: failed building wheel for numpy ( Solved )
The first solution to remove this error is to first upgrade the pip command. After upgrading try to install the NumPy version using...
Read more >
numpy version issue while installing via pip #54 - GitHub
Ubuntu 16.04.6 LTS, Python 3.7.3 (pyenv). Using pip install gluonts in a clean environment will get version conflict error about.
Read more >
Installing NumPy
NumPy can be installed with conda , with pip , with a package manager on macOS and Linux, or from source. For more...
Read more >
Cannot install NumPy using pip and import it - Biostars
Run rm -rf ~/.local/lib/python3.5/site-packages/numpy , then pip install it again. On occasion you get left-over ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found