Problem installing. Conflicting python 2/3 requirements

Using a fresh instance of Alpine:

  • install all required packages
  • clone the redash repo and checkout v7.0.0
  • create a fresh virtualenv
  • run -
    source venv/bin/activate && pip install -r requirements.txt -r requirements_dev.txt -r requirements_all_ds.txt

It errors out on pymapd==0.7.1 with the message of:
RuntimeError: Python version >= 3.5 required.

So I create a python3 virtual env and run the pip install again
This time it fails on:
MySQL-python==1.2.5 with this error: ModuleNotFoundError: No module named 'ConfigParser'
This is an error associated with running that pkg in python3.

There is currently no support for python3 for the MySQL-python pkg.
To get pymapd to work with python2 the version needs to be <0.8

How are people getting around this issue

Interesting. It looks like that MySQL-python version (~2014) is coming from here:

Wonder if we need to use a different MySQL connector? The GitHub repo for that one looks unmaintained.

Redash does not support Python 3 yet. If pymapd==0.7.1 requires Python 3 now it’s a recent change, as it wasn’t the case in the past. If you don’t need MapD support, just remove it from requirements_all_ds.txt and move on with Python 2 setup.

It’s strange though – our CI builds the Docker image regularly with Python 2 and we didn’t have any issues with our current dependencies. Are you sure the problem was with pymapd? Can you add a log?


Relavent snip:

Collecting pandas (from pymapd==0.7.1->-r requirements_all_ds.txt (line 24))
Downloading (11.8MB)
ERROR: Complete output from command python egg_info:
ERROR: Traceback (most recent call last):
File “”, line 1, in
File “/tmp/pip-install-Z4np_W/pandas/”, line 746, in
File “/app/venv/lib/python2.7/site-packages/setuptools/”, line 144, in setup
File “/app/venv/lib/python2.7/site-packages/setuptools/”, line 139, in _install_setup_requires
File “/app/venv/lib/python2.7/site-packages/setuptools/”, line 717, in fetch_build_eggs
File “/app/venv/lib/python2.7/site-packages/pkg_resources/”, line 782, in resolve
File “/app/venv/lib/python2.7/site-packages/pkg_resources/”, line 1065, in best_match
return self.obtain(req, installer)
File “/app/venv/lib/python2.7/site-packages/pkg_resources/”, line 1077, in obtain
return installer(requirement)
File “/app/venv/lib/python2.7/site-packages/setuptools/”, line 784, in fetch_build_egg
return cmd.easy_install(req)
File “/app/venv/lib/python2.7/site-packages/setuptools/command/”, line 679, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File “/app/venv/lib/python2.7/site-packages/setuptools/command/”, line 705, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File “/app/venv/lib/python2.7/site-packages/setuptools/command/”, line 890, in install_eggs
return self.build_and_install(setup_script, setup_base)
File “/app/venv/lib/python2.7/site-packages/setuptools/command/”, line 1158, in build_and_install
self.run_setup(setup_script, setup_base, args)
File “/app/venv/lib/python2.7/site-packages/setuptools/command/”, line 1144, in run_setup
run_setup(setup_script, args)
File “/app/venv/lib/python2.7/site-packages/setuptools/”, line 253, in run_setup
File “/usr/lib/python2.7/”, line 35, in exit
self.gen.throw(type, value, traceback)
File “/app/venv/lib/python2.7/site-packages/setuptools/”, line 195, in setup_context
File “/usr/lib/python2.7/”, line 35, in exit
self.gen.throw(type, value, traceback)
File “/app/venv/lib/python2.7/site-packages/setuptools/”, line 166, in save_modules
File “/app/venv/lib/python2.7/site-packages/setuptools/”, line 141, in resume
six.reraise(type, exc, self._tb)
File “/app/venv/lib/python2.7/site-packages/setuptools/”, line 154, in save_modules
yield saved
File “/app/venv/lib/python2.7/site-packages/setuptools/”, line 195, in setup_context
File “/app/venv/lib/python2.7/site-packages/setuptools/”, line 250, in run_setup
_execfile(setup_script, ns)
File “/app/venv/lib/python2.7/site-packages/setuptools/”, line 45, in _execfile
exec(code, globals, locals)
File “/tmp/easy_install-IJIJZH/numpy-1.17.0rc1/”, line 31, in

RuntimeError: Python version >= 3.5 required.

ERROR: Command “python egg_info” failed with error code 1 in /tmp/pip-install-Z4np_W/pandas/
ERROR: Service ‘redash’ failed to build: The command ‘/bin/bash -o pipefail -c source venv/bin/activate && pip install -r requirements.txt -r requirements_dev.txt -r requirements_all_ds.txt’ returned a non-zero code: 1