Skip to content

pip install on Python2.7 not working #27159

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

Closed
BalakumaranS opened this issue Jul 1, 2019 · 10 comments
Closed

pip install on Python2.7 not working #27159

BalakumaranS opened this issue Jul 1, 2019 · 10 comments

Comments

@BalakumaranS
Copy link

BalakumaranS commented Jul 1, 2019

pip install on Python2.7 fails with the error:

RuntimeError: Python version >= 3.5 required.

this is because numpy has a release version 1.7 which requires 3.5 or above

https://github.com/numpy/numpy/blob/maintenance/1.17.x/setup.py

is it okay to add a dependency check in setup.py? i can do that and submit for review or let me know how do you suggest we address this?

@TomAugspurger
Copy link
Contributor

Pandas master doesn't support 2.7. The next release will require 3.5.

If you're using a recent version of pip, then pip install pandas will respect the python_requires field to only install a version of NumPy and pandas that support python 2.7.

@BalakumaranS
Copy link
Author

BalakumaranS commented Jul 1, 2019

its not just master, you will see this issue on build 0.23.4 as well and yes i am using latest pip @TomAugspurger

@TomAugspurger
Copy link
Contributor

TomAugspurger commented Jul 1, 2019 via email

@tysonclugg
Copy link

tysonclugg commented Jul 1, 2019

I logged an issue against pip with the full output of pip install --no-binary=pandas pandas. If a Python 2.7 environment lacks wheel support, then it may trigger the same result as using the --no-binary option to pip.

The suggested workaround was to install numpy first, and then install pandas.

@TomAugspurger
Copy link
Contributor

TomAugspurger commented Jul 1, 2019 via email

@tysonclugg
Copy link

Thanks for following up. It sounds like this is what pyproject.toml should eventually fix?

I'm not the OP of this issue, I chimed in because it would seem that my issue was quite possibly the same as this, but not definitely. We should wait for @BalakumaranS to provide more details before assuming they are the same.

In the meantime, I think there is enough evidence in the ticket I logged to warrant this ticket being re-opened. I pinged this issue rather than opening my own, since duplicates tickets don't help much.

@BalakumaranS
Copy link
Author

BalakumaranS commented Jul 1, 2019

we use pex for packaging so i found now that this is more of pex issue than anything else for me now, thanks for the inputs provided
let me fix the pex issue first and will post an update if the issue reoccurs or not

@zs1621
Copy link

zs1621 commented Aug 4, 2019

reproduce in python2.7.10 @TomAugspurger

  • environment

(p2) [7:01:19] ~ $ python --version Python 2.7.10

(p2) [7:01:27] ~ $ pip --version pip 19.2.1 from /Users/zs/.virtualenvs/p2/lib/python2.7/site-packages/pip (python 2.7)

  • pip install pandas==0.23.4
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting pandas==0.23.4
  Using cached https://mirrors.aliyun.com/pypi/packages/86/ad/89670f4017b2459dfb5577775efbc4c6c20eb46728ac6e5b721602493724/pandas-0.23.4-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Collecting numpy>=1.9.0 (from pandas==0.23.4)
  Using cached https://mirrors.aliyun.com/pypi/packages/da/32/1b8f2bb5fb50e4db68543eb85ce37b9fa6660cd05b58bddfafafa7ed62da/numpy-1.17.0.zip
    ERROR: Command errored out with exit status 1:
     command: /Users/zs/.virtualenvs/p2/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/gb/1cyr_00d6vg3dbq5r2c9wym80000gn/T/pip-install-9wnTUG/numpy/setup.py'"'"'; __file__='"'"'/private/var/folders/gb/1cyr_00d6vg3dbq5r2c9wym80000gn/T/pip-install-9wnTUG/numpy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: /private/var/folders/gb/1cyr_00d6vg3dbq5r2c9wym80000gn/T/pip-install-9wnTUG/numpy/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/gb/1cyr_00d6vg3dbq5r2c9wym80000gn/T/pip-install-9wnTUG/numpy/setup.py", line 31, in <module>
        raise RuntimeError("Python version >= 3.5 required.")
    RuntimeError: Python version >= 3.5 required.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

@TomAugspurger
Copy link
Contributor

TomAugspurger commented Aug 4, 2019 via email

@zs1621
Copy link

zs1621 commented Aug 5, 2019

@TomAugspurger yes

pip install numpy==1.10.4 then install pandas success thanks ~~

zelima added a commit to datopian/ckanext-cprvalidation that referenced this issue Oct 30, 2019
Suggested workaround for when installing pandas
```
RuntimeError: Python version >= 3.5 required.
```
pandas-dev/pandas#27159 (comment)
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

4 participants