tableau / TabPy

Execute Python code on the fly and display results in Tableau visualizations:
https://tableau.github.io/TabPy/
MIT License
1.56k stars 598 forks source link

ubuntu16.04 install: 'configparser' not found #216

Closed dams666 closed 5 years ago

dams666 commented 5 years ago

Hi

I'm trying to install TabPy on ubuntu 16.04 LTS, but I get a 'configparser' dependancy error.

Manually installing it didn't solve the issue.

Thx in advance

root@opbigbiom03:~/TabPy-master# ./startup.sh Setting TABPY_ROOT to current working directory. Installing TabPy-server requirements. Read the logs at /root/TabPy-master/tabpy-server/install.log TabPy startup failed. root@opbigbiom03:~/TabPy-master# vim tabpy-server/install.log root@opbigbiom03:~/TabPy-master# ./startup.sh Setting TABPY_ROOT to current working directory. Installing TabPy-server requirements. Read the logs at /root/TabPy-master/tabpy-server/install.log TabPy startup failed. root@opbigbiom03:~/TabPy-master# ./startup.sh Setting TABPY_ROOT to current working directory. Installing TabPy-server requirements. Read the logs at /root/TabPy-master/tabpy-server/install.log TabPy startup failed. root@opbigbiom03:~/TabPy-master# vim tabpy-server/install.log byte-compiling build/bdist.linux-x86_64/egg/tabpy_server/common/util.py to util.cpython-35.pyc byte-compiling build/bdist.linux-x86_64/egg/tabpy_server/common/messages.py to messages.cpython-35.pyc byte-compiling build/bdist.linux-x86_64/egg/tabpy_server/common/endpoint_file_mgr.py to endpoint_file_mgr.cpython-35.pyc creating build/bdist.linux-x86_64/egg/EGG-INFO copying tabpy_server.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO copying tabpy_server.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying tabpy_server.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying tabpy_server.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying tabpy_server.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO zip_safe flag not set; analyzing archive contents... tabpy_server.pycache.tabpy.cpython-35: module references file creating 'dist/tabpy_server-0.3.2-py3.5.egg' and adding 'build/bdist.linux-x86_64/egg' to it removing 'build/bdist.linux-x86_64/egg' (and everything under it) Processing tabpy_server-0.3.2-py3.5.egg removing '/usr/local/lib/python3.5/dist-packages/tabpy_server-0.3.2-py3.5.egg' (and everything under it) creating /usr/local/lib/python3.5/dist-packages/tabpy_server-0.3.2-py3.5.egg Extracting tabpy_server-0.3.2-py3.5.egg to /usr/local/lib/python3.5/dist-packages tabpy-server 0.3.2 is already the active version in easy-install.pth

Installed /usr/local/lib/python3.5/dist-packages/tabpy_server-0.3.2-py3.5.egg Processing dependencies for tabpy-server==0.3.2 Searching for configparser Reading https://pypi.python.org/simple/configparser/ Best match: configparser 3.7.3 Downloading https://files.pythonhosted.org/packages/4a/4d/5d4c07cd28476ecad84ea5ad43961e50b6fd74cd24b9b81113650b4de6ee/configparser-3.7.3.tar.gz#sha256=27594cf4fc279f321974061ac69164aaebd2749af962ac8686b20503ac0bcf2d Processing configparser-3.7.3.tar.gz Writing /tmp/easy_install-nwky_z_j/configparser-3.7.3/setup.cfg Running configparser-3.7.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-nwky_z_j/configparser-3.7.3/egg-dist-tmp-svsbh6pl zip_safe flag not set; analyzing archive contents... backports.pycache.init.cpython-35: module references path removing '/usr/local/lib/python3.5/dist-packages/UNKNOWN-0.0.0-py3.5.egg' (and everything under it) creating /usr/local/lib/python3.5/dist-packages/UNKNOWN-0.0.0-py3.5.egg Extracting UNKNOWN-0.0.0-py3.5.egg to /usr/local/lib/python3.5/dist-packages UNKNOWN 0.0.0 is already the active version in easy-install.pth

Installed /usr/local/lib/python3.5/dist-packages/UNKNOWN-0.0.0-py3.5.egg error: The 'configparser' distribution was not found and is required by tabpy-server

0golovatyi commented 5 years ago

@dams666 I see you are using Python 3.5, recommended is Python 3.6. I believe this is where packages incompatibility is from.

WillAyd commented 5 years ago

Not entirely sure but this might be solved by #202

configparser is in the standard library even as of 3.5 so shouldn't require installation from an external party

dams666 commented 5 years ago

Hi,

@0golovatyi python 3.6 is not availiable natively on ubuntu 16.04. I tried to compile it from source, but that became too much of a hassle :(

With the new sources (from today), I get this error:

Installed /usr/local/lib/python3.5/dist-packages/tabpy_server-0.3.2-py3.5.egg Processing dependencies for tabpy-server==0.3.2 Searching for cryptography>=2.3 Reading https://pypi.python.org/simple/cryptography/ Best match: cryptography 2.6.1 Downloading https://files.pythonhosted.org/packages/07/ca/bc827c5e55918ad223d59d299fff92f3563476c3b00d0a9157d9c0217449/cryptography-2.6.1.tar.gz#sha256=26c821cbeb683facb966045e2064303029d572a87ee69ca5a1bf54bf55f93ca6 Processing cryptography-2.6.1.tar.gz Writing /tmp/easy_install-z1ihuu2n/cryptography-2.6.1/setup.cfg Running cryptography-2.6.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-z1ihuu2n/cryptography-2.6.1/egg-dist-tmp-mdhb6pgl c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory compilation terminated. error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

WillAyd commented 5 years ago

Since you are installing from source I think you'll need to take care of some C extensions required for cryptography. Check these dependencies:

https://cryptography.io/en/latest/installation/#building-cryptography-on-linux

@0golovatyi I think this is going to continue being an issue using setuptools for installation. Might be good motivation to move to pip or some other package manager so wheels will be used by default instead of eggs. Could be wrong but worth investigating

dams666 commented 5 years ago

Is there a prebuild debian package available ? Since tableau server for unix users runs on ubuntu 16.04, that would make sense to ease installation here ...

0golovatyi commented 5 years ago

@dams666 We were only able to confirm TabPy works on ubuntu 18.04 with Python 3.6.7 as mentioned at https://github.com/tableau/TabPy/blob/dev/docs/server-configurations.md. The issue is Python you have has to be built from sources with cryptography feature enabled and there's no package AFAIK.

Here are instructions for how to build Python with zlib (which your env may miss as well) and I assume to enable cryptography you'll need to do something similar - https://askubuntu.com/questions/661039/trouble-with-zip-support-in-custom-python-build-zipimport-zipimporterror-cant.

WillAyd commented 5 years ago

@0golovatyi @nmannheimer are there any plans to distribute wheels and update what's up PyPi at any point? I think that would make things a lot easier since installing from source isn't something all devs will necessarily be comfortable with

0golovatyi commented 5 years ago

@WillAyd no specific plans yet. I'll make sure we discuss the option. TBH I am personally not familiar with it yet and need some time for investigation.