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

RuntimeError: Python version >= 3.5 required #47

Open
Laski opened this issue Jul 2, 2019 · 2 comments
Open

RuntimeError: Python version >= 3.5 required #47

Laski opened this issue Jul 2, 2019 · 2 comments

Comments

@Laski
Copy link

Laski commented Jul 2, 2019

When installing in a virtual environment with Python 2, the setup fails with

    ERROR: Complete output from command python setup.py egg_info:
    ERROR: Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-lwlGz6/reverse-geocoder/setup.py", line 32, in <module>
        long_description=read('README.txt'))
      File "/home/laski/.virtualenvs/prueba/local/lib/python2.7/site-packages/setuptools/__init__.py", line 144, in setup
        _install_setup_requires(attrs)
      File "/home/laski/.virtualenvs/prueba/local/lib/python2.7/site-packages/setuptools/__init__.py", line 139, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "/home/laski/.virtualenvs/prueba/local/lib/python2.7/site-packages/setuptools/dist.py", line 717, in fetch_build_eggs
        replace_conflicting=True,
      File "/home/laski/.virtualenvs/prueba/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 774, in resolve
        replace_conflicting=replace_conflicting
      File "/home/laski/.virtualenvs/prueba/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1057, in best_match
        return self.obtain(req, installer)
      File "/home/laski/.virtualenvs/prueba/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1069, in obtain
        return installer(requirement)
      File "/home/laski/.virtualenvs/prueba/local/lib/python2.7/site-packages/setuptools/dist.py", line 784, in fetch_build_egg
        return cmd.easy_install(req)
      File "/home/laski/.virtualenvs/prueba/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 679, in easy_install
        return self.install_item(spec, dist.location, tmpdir, deps)
      File "/home/laski/.virtualenvs/prueba/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 705, in install_item
        dists = self.install_eggs(spec, download, tmpdir)
      File "/home/laski/.virtualenvs/prueba/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 890, in install_eggs
        return self.build_and_install(setup_script, setup_base)
      File "/home/laski/.virtualenvs/prueba/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1158, in build_and_install
        self.run_setup(setup_script, setup_base, args)
      File "/home/laski/.virtualenvs/prueba/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1144, in run_setup
        run_setup(setup_script, args)
      File "/home/laski/.virtualenvs/prueba/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 253, in run_setup
        raise
      File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
        self.gen.throw(type, value, traceback)
      File "/home/laski/.virtualenvs/prueba/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
        yield
      File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
        self.gen.throw(type, value, traceback)
      File "/home/laski/.virtualenvs/prueba/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 166, in save_modules
        saved_exc.resume()
      File "/home/laski/.virtualenvs/prueba/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 141, in resume
        six.reraise(type, exc, self._tb)
      File "/home/laski/.virtualenvs/prueba/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 154, in save_modules
        yield saved
      File "/home/laski/.virtualenvs/prueba/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
        yield
      File "/home/laski/.virtualenvs/prueba/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 250, in run_setup
        _execfile(setup_script, ns)
      File "/home/laski/.virtualenvs/prueba/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 45, in _execfile
        exec(code, globals, locals)
      File "/tmp/easy_install-wdY3Ym/numpy-1.17.0rc1/setup.py", line 31, in <module>
        license='lgpl',
    RuntimeError: Python version >= 3.5 required.

It seems to be trying to install numpy-1.17.0rc1, which needs Python 3.

This happens even if trying to pip install -r from a file where a minor version of numpy is pinned (perhaps related with having numpy listed as a setup_requires apart from install_requires?)

Steps to reproduce:

mkvirtualenv test   # python 2
pip install --no-cache-dir reverse-geocoder
@Laski
Copy link
Author

Laski commented Jul 2, 2019

If anyone's interested, we've found a (hacky) workaround:

  1. Manually install dependencies (numpy & scipy)
  2. pip install --no-deps reverse-geocoder

@A4TIF
Copy link

A4TIF commented Jul 4, 2019

I'm having the exact same issue. I'm using docker, and this issue is causing my docker build to break with requirements.txt.
@Laski workaround seems to work.

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

2 participants