pandas: pip install panadas fails on numpy version

Code Sample, a copy-pastable example if possible

C:\Users\nickdmax
λ pip install pandas
Collecting pandas
  Downloading https://files.pythonhosted.org/packages/08/01/803834bc8a4e708aedebb133095a88a4dad9f45bbaf5ad777d2bea543c7e/pandas-0.22.0.tar.gz (11.3MB)
    100% |################################| 11.3MB 315kB/s
  Could not find a version that satisfies the requirement numpy==1.9.3 (from versions: 1.10.4, 1.11.0, 1.11.1rc1, 1.11.1, 1.11.2rc1, 1.11.2, 1.11.3, 1.12.0b1, 1.12.0rc1, 1.12.0rc2, 1.12.0, 1.12.1rc1, 1.12.1, 1.13.0rc1, 1.13.0rc2, 1.13.0, 1.13.1, 1.13.3, 1.14.0rc1, 1.14.0, 1.14.1, 1.14.2)
No matching distribution found for numpy==1.9.3

C:\Users\nickdmax
λ pip list
...
numpy               1.14.2
...

Problem description

I was unable to upgrade pandas (same error as above). I don’t think I have ever had numpy 1.9.3 installed. Since there was a numpy directory under the current pandas directory I did an uninstall “pip uninstall pandas” to attempt to reinstall.

Output of pip freeze

vattrs==17.2.0 Automat==0.6.0 backcall==0.1.0 backports-abc==0.5 bleach==2.1.3 certifi==2017.4.17 chardet==3.0.4 colorama==0.3.9 constantly==15.1.0 cssselect==1.0.1 cycler==0.10.0 decorator==4.2.1 entrypoints==0.2.3 html5lib==1.0.1 hyperlink==17.3.0 idna==2.5 incremental==17.5.0 ipykernel==4.8.2 ipython==6.3.1 ipython-genutils==0.2.0 ipywidgets==7.2.1 jedi==0.11.1 Jinja2==2.10 jsonschema==2.6.0 jupyter==1.0.0 jupyter-client==5.2.3 jupyter-console==5.2.0 jupyter-core==4.4.0 kiwisolver==1.0.1 MarkupSafe==1.0 matplotlib==2.2.2 mistune==0.8.3 nbconvert==5.3.1 nbformat==4.4.0 notebook==5.0.0 numpy==1.14.2 pandocfilters==1.4.2 parso==0.1.1 pickleshare==0.7.4 prompt-toolkit==1.0.15 PyDispatcher==2.0.5 Pygments==2.2.0 PyParse==1.1.7 pyparsing==2.2.0 python-dateutil==2.7.2 pytz==2018.4 pywinpty==0.5.1 pyzmq==17.0.0 qtconsole==4.3.1 requests==2.18.2 Rx==1.5.9 scipy==0.19.1 simplegeneric==0.8.1 six==1.11.0 testpath==0.3.1 tornado==5.0.2 traitlets==4.3.2 typing==3.6.4 urllib3==1.22 virtualenv==15.1.0 w3lib==1.17.0 wcwidth==0.1.7 webencodings==0.5.1 widgetsnbextension==3.2.1 win-unicode-console==0.5 zope.interface==4.4.2

pip version 10.0.0

python -c "import numpy; print(numpy.version.version)" 1.14.2

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 10
  • Comments: 31 (23 by maintainers)

Commits related to this issue

Most upvoted comments

I just wanted to share my workaround for my use case: I use tox to test a package supporting python 3.4 to 3.6 and depending on pandas.

In the file requirements.txt, I changed from:

pandas

to

pandas; python_version >= '3.5'
pandas<0.21; python_version == '3.4'

Such that pip install -r requirements.txt works for any version of python from 3.4 to 3.6. (assuming pip is not too old)

Got the idea from: https://stackoverflow.com/questions/29222269/is-there-a-way-to-have-a-conditional-requirements-txt-file-for-my-python-applica/35614580#35614580

Hope it is useful to someone else.

we support 3.5+ the world has moved on from 3.4

Understood. However, pandas 0.22 is still downloaded on Python 3.4 environments. Shouldn’t pandas (even if only in the future) add something to limit what versions of python it is downloaded for? Like the python_requires argument mentioned in my link above? I’ve never had to worry about this before so I’m not sure what is standard practice for limiting python and package versions like this.

I will file a bug with pip about the specific error message I was getting.

for python3.4 u can use below option works fine with the older version of pandas

pip install pandas==0.19.0

@laxatives That doesn’t look like python 3.6 to me. The wheel in your quoted text is for python 3.4 (cp34).

ok so Officially Python 2.7, 3.5, and 3.6. is still true?

Also “the world has moved on from 3.4”, maybe in your world because you forced it. Not everyone can afford to upgrade python versions. That said, I agree and wouldn’t support 3.4 either if I had a feature that was more difficult to code on 3.4.

@answerquest See https://github.com/pandas-dev/pandas/issues/20775 for general notes on this problem. Your problem is indeed that we don’t provide wheels for 32 bit, and installing pandas from source with pip started failing with pip 10. As noted in https://github.com/pandas-dev/pandas/issues/20775, you can do pip install pandas --no-build-isolation or keep pip at version < 10 as you did.

Maybe pip 9.0.3 ignored this while pip 10.x is taking it seriously?

Yes, only from pip 10 it uses the pyproject.toml file. But those requirements are not for the environment you are installing it in (so there you can still have a newer numpy), it is only for the separate build environment it tries to create to build pandas.

This may have been fixed in pip 10.0.1 I think

Possibly the reading of the version specification is fixed, but then you would still run into the same problem that there are no wheels for numpy for 32bit, and then pip will still fail on that.

I wouldn’t say disingenuous, just not experienced in complex features that actually required dropping python 3.4 in my own projects (except for maybe some pickle serialization…). Pull request incoming…

Edit: About volunteering, as the person who semi-recently became the maintainer of vispy, I get it. I seem to have the tendency of becoming the maintainer of projects that no one else has time for.