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?

Thanks.

Relavent snip:

Collecting pandas (from pymapd==0.7.1->-r requirements_all_ds.txt (line 24))
Downloading https://files.pythonhosted.org/packages/b2/4c/b6f966ac91c5670ba4ef0b0b5613b5379e3c7abdfad4e7b89a87d73bae13/pandas-0.24.2.tar.gz (11.8MB)
ERROR: Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
File “”, line 1, in
File “/tmp/pip-install-Z4np_W/pandas/setup.py”, line 746, in
**setuptools_kwargs)
File “/app/venv/lib/python2.7/site-packages/setuptools/init.py”, line 144, in setup
_install_setup_requires(attrs)
File “/app/venv/lib/python2.7/site-packages/setuptools/init.py”, line 139, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File “/app/venv/lib/python2.7/site-packages/setuptools/dist.py”, line 717, in fetch_build_eggs
replace_conflicting=True,
File “/app/venv/lib/python2.7/site-packages/pkg_resources/init.py”, line 782, in resolve
replace_conflicting=replace_conflicting
File “/app/venv/lib/python2.7/site-packages/pkg_resources/init.py”, line 1065, in best_match
return self.obtain(req, installer)
File “/app/venv/lib/python2.7/site-packages/pkg_resources/init.py”, line 1077, in obtain
return installer(requirement)
File “/app/venv/lib/python2.7/site-packages/setuptools/dist.py”, line 784, in fetch_build_egg
return cmd.easy_install(req)
File “/app/venv/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 “/app/venv/lib/python2.7/site-packages/setuptools/command/easy_install.py”, line 705, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File “/app/venv/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 “/app/venv/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 “/app/venv/lib/python2.7/site-packages/setuptools/command/easy_install.py”, line 1144, in run_setup
run_setup(setup_script, args)
File “/app/venv/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 “/app/venv/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 “/app/venv/lib/python2.7/site-packages/setuptools/sandbox.py”, line 166, in save_modules
saved_exc.resume()
File “/app/venv/lib/python2.7/site-packages/setuptools/sandbox.py”, line 141, in resume
six.reraise(type, exc, self._tb)
File “/app/venv/lib/python2.7/site-packages/setuptools/sandbox.py”, line 154, in save_modules
yield saved
File “/app/venv/lib/python2.7/site-packages/setuptools/sandbox.py”, line 195, in setup_context
yield
File “/app/venv/lib/python2.7/site-packages/setuptools/sandbox.py”, line 250, in run_setup
_execfile(setup_script, ns)
File “/app/venv/lib/python2.7/site-packages/setuptools/sandbox.py”, line 45, in _execfile
exec(code, globals, locals)
File “/tmp/easy_install-IJIJZH/numpy-1.17.0rc1/setup.py”, line 31, in

RuntimeError: Python version >= 3.5 required.
----------------------------------------

ERROR: Command “python setup.py 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