Tabpy là một service cho phép kết nối đến Tableau để tính toán những công việc nặng nhọc mà Tableau Desktop không thể xử lý hoặc nếu xử lý sẽ rất khó khăn. Khi phải cài đặt tabpy chúng ta cần phải có internet. Tuy nhiên, trong nhiều hoàn cảnh đặc biệt, bạn phải cài đặt trên 1 con server ngắt kết nối internet (ví dụ server cần bảo mật hoặc gặp trục trặc nào đó không kết nối internet được). Đây là một bài toán mình đã gặp phải và tìm cách giải quyết. Hy vọng qua bài viết sẽ giúp ích cho mọi người, những kinh nghiệm cho ai muốn cài đặt các service không cần kết nối internet
I. Cài đặt python3.6
Step 1. Mở terminal và thêm repository trong yum install
sudo yum install -y https://centos7.iuscommunity.org/ius-release.rpm
Step 2. Update Yum
sudo yum update
Step 3. Download and install Python
sudo yum install -y python36u python36u-libs python36u-devel python36u-pip
Step 4. Check lại version Python đã cài đặt
python3.6 -V
II. Cài đặt Tabpy
Step 1. Download source code tabpy từ github
git clone https://github.com/tableau/TabPy.git
Step 2. Cài đặt thư viện Tabpy sử dụng pip
- Dưới đây là các thư viện được sử dụng để cài đặt tabpy, nếu không có các thư viện này thì việc cài đặt offline sẽ bị lỗi, vì vậy chúng ta sẽ thực hiện liệt kê và download các thư viện này nhé
trong file setup.py từ source code trên github của tabpy
install_requires=[
'backports_abc',
'cloudpickle',
'configparser',
'decorator',
'future',
'genson',
'jsonschema',
'pyopenssl',
'python-dateutil',
'requests',
'singledispatch',
'six',
'tornado',
'urllib3<1.25,>=1.21.1'
],
- Tạo file requirement.txt định nghĩa các thư viện sẽ tải về
tabpy==0.8.6
sklearn==0.0
pandas==0.25.1
numpy==1.17.2
textblob==0.15.3
nltk==3.4.5
scipy==1.3.1
scikit-learn==0.21.3
pytz==2019.2
python-dateutil==2.8.0
joblib==0.14.0
Trong đó,
- tabpy==0.8.6 : Download libs for install tabpy
- others : Download libs for deploy models
khi khai báo tabpy==0.8.6, việc sử dụng pip sẽ tự động download tất cả các thư viện của tabpy, giúp chúng ta không cần phải tìm kiếm từng thư viện để download, tiết kiệm thời gian tìm kiếm
- Tạo 1 thư mục chứa các thư viện sẽ download về
$ mkdir /tmp/lib_download
- Tiến hành download các thư viện cần thiết của Tabpy
$ cd /tmp/lib_download
$ pip3.6 download -r requirement.txt
- Kiểm tra lại các thư viện đã download về thành công hay chưa
$ ll -ls
合計 70020
100 -rw-r--r-- 1 root root 101571 10月 2 16:55 asn1crypto-0.24.0-py2.py3-none-any.whl
40 -rw-r--r-- 1 root root 40717 10月 2 16:55 attrs-19.2.0-py2.py3-none-any.whl
8 -rw-r--r-- 1 root root 5232 10月 2 16:55 backports_abc-0.5-py2.py3-none-any.whl
152 -rw-r--r-- 1 root root 154423 10月 2 16:55 certifi-2019.9.11-py2.py3-none-any.whl
424 -rw-r--r-- 1 root root 430403 10月 2 16:55 cffi-1.12.3-cp36-cp36m-manylinux1_x86_64.whl
132 -rw-r--r-- 1 root root 133356 10月 2 16:55 chardet-3.0.4-py2.py3-none-any.whl
28 -rw-r--r-- 1 root root 25973 10月 2 16:55 cloudpickle-1.2.2-py2.py3-none-any.whl
24 -rw-r--r-- 1 root root 22828 10月 2 16:55 configparser-4.0.2-py2.py3-none-any.whl
2228 -rw-r--r-- 1 root root 2278572 10月 2 16:55 cryptography-2.7-cp34-abi3-manylinux1_x86_64.whl
12 -rw-r--r-- 1 root root 8296 10月 2 16:55 decorator-4.4.0-py2.py3-none-any.whl
812 -rw-r--r-- 1 root root 829119 10月 2 16:55 future-0.17.1.tar.gz
28 -rw-r--r-- 1 root root 26662 10月 2 16:55 genson-1.1.0.tar.gz
60 -rw-r--r-- 1 root root 58594 10月 2 16:55 idna-2.8-py2.py3-none-any.whl
288 -rw-r--r-- 1 root root 294175 10月 2 16:55 joblib-0.14.0-py2.py3-none-any.whl
56 -rw-r--r-- 1 root root 54691 10月 2 16:55 jsonschema-3.0.2-py2.py3-none-any.whl
1420 -rw-r--r-- 1 root root 1450555 10月 2 16:55 nltk-3.4.5.zip
19884 -rw-r--r-- 1 root root 20360668 10月 2 16:55 numpy-1.17.2-cp36-cp36m-manylinux1_x86_64.whl
10216 -rw-r--r-- 1 root root 10460083 10月 2 16:55 pandas-0.25.1-cp36-cp36m-manylinux1_x86_64.whl
56 -rw-r--r-- 1 root root 53333 10月 2 16:55 pyOpenSSL-19.0.0-py2.py3-none-any.whl
156 -rw-r--r-- 1 root root 158295 10月 2 16:55 pycparser-2.19.tar.gz
108 -rw-r--r-- 1 root root 107237 10月 2 16:55 pyrsistent-0.15.4.tar.gz
224 -rw-r--r-- 1 root root 226803 10月 2 16:55 python_dateutil-2.8.0-py2.py3-none-any.whl
500 -rw-r--r-- 1 root root 508914 10月 2 16:55 pytz-2019.2-py2.py3-none-any.whl
60 -rw-r--r-- 1 root root 57952 10月 2 16:55 requests-2.22.0-py2.py3-none-any.whl
4 -rw-r--r-- 1 root root 174 10月 2 16:53 requirement.txt
6516 -rw-r--r-- 1 root root 6672239 10月 2 16:55 scikit_learn-0.21.3-cp36-cp36m-manylinux1_x86_64.whl
24612 -rw-r--r-- 1 root root 25201286 10月 2 16:55 scipy-1.3.1-cp36-cp36m-manylinux1_x86_64.whl
564 -rw-r--r-- 1 root root 576332 10月 2 16:55 setuptools-41.2.0-py2.py3-none-any.whl
16 -rw-r--r-- 1 root root 12897 10月 2 16:55 singledispatch-3.4.0.3-py2.py3-none-any.whl
12 -rw-r--r-- 1 root root 10586 10月 2 16:55 six-1.12.0-py2.py3-none-any.whl
4 -rw-r--r-- 1 root root 1148 10月 2 16:55 sklearn-0.0.tar.gz
60 -rw-r--r-- 1 root root 61397 10月 2 16:55 tabpy-0.8.6-py3-none-any.whl
624 -rw-r--r-- 1 root root 636507 10月 2 16:55 textblob-0.15.3-py2.py3-none-any.whl
472 -rw-r--r-- 1 root root 482444 10月 2 16:55 tornado-6.0.3.tar.gz
120 -rw-r--r-- 1 root root 118799 10月 2 16:55 urllib3-1.24.3-py2.py3-none-any.whl
Chú ý
Các công việc này chúng ta phải thực hiện từ 1 máy có kết nối internet, sau khi đã hoàn thành việc download mọi thứ cần thiết cho việc cài đặt, chúng ta sẽ bắt tay copy toàn bộ lên server và thực hiện cài đặt
Step 3: Cài đặt tabpy trên server offline
- Cài đặt các lib sử dụng pip
$ pip3.6 install /tmp/lib_download/*
Processing ./future-0.17.1.tar.gz
Processing ./genson-1.1.0.tar.gz
Processing ./pycparser-2.19.tar.gz
Processing ./pyrsistent-0.15.4.tar.gz
Processing ./tornado-6.0.3.tar.gz
Processing ./asn1crypto-0.24.0-py2.py3-none-any.whl
Processing ./attrs-19.2.0-py2.py3-none-any.whl
Processing ./backports_abc-0.5-py2.py3-none-any.whl
Processing ./certifi-2019.9.11-py2.py3-none-any.whl
Processing ./cffi-1.12.3-cp36-cp36m-manylinux1_x86_64.whl
Processing ./chardet-3.0.4-py2.py3-none-any.whl
Processing ./cloudpickle-1.2.2-py2.py3-none-any.whl
Processing ./configparser-4.0.2-py2.py3-none-any.whl
Processing ./cryptography-2.7-cp34-abi3-manylinux1_x86_64.whl
Processing ./decorator-4.4.0-py2.py3-none-any.whl
Processing ./idna-2.8-py2.py3-none-any.whl
Processing ./jsonschema-3.0.2-py2.py3-none-any.whl
Processing ./pyOpenSSL-19.0.0-py2.py3-none-any.whl
Processing ./pytest_runner-4.0-py2.py3-none-any.whl
Processing ./python_dateutil-2.8.0-py2.py3-none-any.whl
Processing ./requests-2.22.0-py2.py3-none-any.whl
Processing ./setuptools-41.2.0-py2.py3-none-any.whl
Processing ./singledispatch-3.4.0.3-py2.py3-none-any.whl
Processing ./six-1.12.0-py2.py3-none-any.whl
Processing ./tabpy-0.8.6-py3-none-any.whl
Processing ./urllib3-1.24.3-py2.py3-none-any.whl
Installing collected packages: asn1crypto, attrs, backports-abc, certifi, pycparser, cffi, chardet, cloudpickle, configparser, six, cryptography, decorator, idna, pyrsistent, setuptools, jsonschema, pyOpenSSL, python-dateutil, urllib3, requests, singledispatch, future, genson, tornado, tabpy
Running setup.py install for pycparser ... done
WARNING: The script chardetect is installed in '/usr/local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Running setup.py install for pyrsistent ... done
Found existing installation: setuptools 39.2.0
Uninstalling setuptools-39.2.0:
Successfully uninstalled setuptools-39.2.0
WARNING: The script jsonschema is installed in '/usr/local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Running setup.py install for future ... done
Running setup.py install for genson ... done
Running setup.py install for tornado ... done
WARNING: The scripts tabpy, tabpy-deploy-models and tabpy-user-management are installed in '/usr/local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed asn1crypto-0.24.0 attrs-19.2.0 backports-abc-0.5 certifi-2019.9.11 cffi-1.12.3 chardet-3.0.4 cloudpickle-1.2.2 configparser-4.0.2 cryptography-2.7 decorator-4.4.0 future-0.17.1 genson-1.1.0 idna-2.8 jsonschema-3.0.2 pyOpenSSL-19.0.0 pycparser-2.19 pyrsistent-0.15.4 pytest-runner-4.0 python-dateutil-2.8.0 requests-2.22.0 setuptools-41.2.0 singledispatch-3.4.0.3 six-1.12.0 tabpy-0.8.6 tornado-6.0.3 urllib3-1.24.3
- Kiểm tra lại các thư viện đã cài đặt
$ pip3.6 list
Package Version
-------------------------
asn1crypto (0.24.0)
attrs (19.2.0)
backports-abc (0.5)
certifi (2019.9.11)
cffi (1.12.3)
chardet (3.0.4)
cloudpickle (1.2.2)
configparser (4.0.2)
cryptography (2.7)
decorator (4.4.0)
future (0.17.1)
genson (1.1.0)
idna (2.8)
joblib (0.14.0)
jsonschema (3.0.2)
nltk (3.4.5)
numpy (1.17.2)
pandas (0.25.1)
pip (9.0.3)
pycparser (2.19)
pyOpenSSL (19.0.0)
pyrsistent (0.15.4)
pytest-runner (4.0)
python-dateutil (2.8.0)
pytz (2019.2)
requests (2.22.0)
scikit-learn (0.21.3)
scipy (1.3.1)
setuptools (41.2.0)
singledispatch (3.4.0.3)
six (1.12.0)
sklearn (0.0)
tabpy (0.8.6)
textblob (0.15.3)
tornado (6.0.3)
urllib3 (1.24.3)
- Copy source code của tabpy lên server
- Cài đặt tabpy
$ sudo python3.6 setup.py install
running install
running bdist_egg
running egg_info
creating tabpy.egg-info
writing tabpy.egg-info/PKG-INFO
writing dependency_links to tabpy.egg-info/dependency_links.txt
writing entry points to tabpy.egg-info/entry_points.txt
writing requirements to tabpy.egg-info/requires.txt
writing top-level names to tabpy.egg-info/top_level.txt
writing manifest file 'tabpy.egg-info/SOURCES.txt'
reading manifest file 'tabpy.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'tabpy.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib
creating build/lib/tabpy
copying tabpy/__init__.py -> build/lib/tabpy
copying tabpy/tabpy.py -> build/lib/tabpy
creating build/lib/tabpy/models
copying tabpy/models/__init__.py -> build/lib/tabpy/models
copying tabpy/models/deploy_models.py -> build/lib/tabpy/models
creating build/lib/tabpy/tabpy_server
copying tabpy/tabpy_server/__init__.py -> build/lib/tabpy/tabpy_server
creating build/lib/tabpy/tabpy_tools
copying tabpy/tabpy_tools/__init__.py -> build/lib/tabpy/tabpy_tools
copying tabpy/tabpy_tools/client.py -> build/lib/tabpy/tabpy_tools
copying tabpy/tabpy_tools/custom_query_object.py -> build/lib/tabpy/tabpy_tools
copying tabpy/tabpy_tools/query_object.py -> build/lib/tabpy/tabpy_tools
copying tabpy/tabpy_tools/rest.py -> build/lib/tabpy/tabpy_tools
copying tabpy/tabpy_tools/rest_client.py -> build/lib/tabpy/tabpy_tools
copying tabpy/tabpy_tools/schema.py -> build/lib/tabpy/tabpy_tools
creating build/lib/tabpy/utils
copying tabpy/utils/__init__.py -> build/lib/tabpy/utils
copying tabpy/utils/user_management.py -> build/lib/tabpy/utils
creating build/lib/tabpy/models/scripts
copying tabpy/models/scripts/PCA.py -> build/lib/tabpy/models/scripts
copying tabpy/models/scripts/SentimentAnalysis.py -> build/lib/tabpy/models/scripts
copying tabpy/models/scripts/__init__.py -> build/lib/tabpy/models/scripts
copying tabpy/models/scripts/tTest.py -> build/lib/tabpy/models/scripts
creating build/lib/tabpy/models/utils
copying tabpy/models/utils/__init__.py -> build/lib/tabpy/models/utils
copying tabpy/models/utils/setup_utils.py -> build/lib/tabpy/models/utils
creating build/lib/tabpy/tabpy_server/app
copying tabpy/tabpy_server/app/ConfigParameters.py -> build/lib/tabpy/tabpy_server/app
copying tabpy/tabpy_server/app/SettingsParameters.py -> build/lib/tabpy/tabpy_server/app
copying tabpy/tabpy_server/app/__init__.py -> build/lib/tabpy/tabpy_server/app
copying tabpy/tabpy_server/app/app.py -> build/lib/tabpy/tabpy_server/app
copying tabpy/tabpy_server/app/util.py -> build/lib/tabpy/tabpy_server/app
creating build/lib/tabpy/tabpy_server/common
copying tabpy/tabpy_server/common/__init__.py -> build/lib/tabpy/tabpy_server/common
copying tabpy/tabpy_server/common/endpoint_file_mgr.py -> build/lib/tabpy/tabpy_server/common
copying tabpy/tabpy_server/common/messages.py -> build/lib/tabpy/tabpy_server/common
copying tabpy/tabpy_server/common/util.py -> build/lib/tabpy/tabpy_server/common
creating build/lib/tabpy/tabpy_server/handlers
copying tabpy/tabpy_server/handlers/__init__.py -> build/lib/tabpy/tabpy_server/handlers
copying tabpy/tabpy_server/handlers/base_handler.py -> build/lib/tabpy/tabpy_server/handlers
copying tabpy/tabpy_server/handlers/endpoint_handler.py -> build/lib/tabpy/tabpy_server/handlers
copying tabpy/tabpy_server/handlers/endpoints_handler.py -> build/lib/tabpy/tabpy_server/handlers
copying tabpy/tabpy_server/handlers/evaluation_plane_handler.py -> build/lib/tabpy/tabpy_server/handlers
copying tabpy/tabpy_server/handlers/main_handler.py -> build/lib/tabpy/tabpy_server/handlers
copying tabpy/tabpy_server/handlers/management_handler.py -> build/lib/tabpy/tabpy_server/handlers
copying tabpy/tabpy_server/handlers/query_plane_handler.py -> build/lib/tabpy/tabpy_server/handlers
copying tabpy/tabpy_server/handlers/service_info_handler.py -> build/lib/tabpy/tabpy_server/handlers
copying tabpy/tabpy_server/handlers/status_handler.py -> build/lib/tabpy/tabpy_server/handlers
copying tabpy/tabpy_server/handlers/upload_destination_handler.py -> build/lib/tabpy/tabpy_server/handlers
copying tabpy/tabpy_server/handlers/util.py -> build/lib/tabpy/tabpy_server/handlers
creating build/lib/tabpy/tabpy_server/management
copying tabpy/tabpy_server/management/__init__.py -> build/lib/tabpy/tabpy_server/management
copying tabpy/tabpy_server/management/state.py -> build/lib/tabpy/tabpy_server/management
copying tabpy/tabpy_server/management/util.py -> build/lib/tabpy/tabpy_server/management
creating build/lib/tabpy/tabpy_server/psws
copying tabpy/tabpy_server/psws/__init__.py -> build/lib/tabpy/tabpy_server/psws
copying tabpy/tabpy_server/psws/callbacks.py -> build/lib/tabpy/tabpy_server/psws
copying tabpy/tabpy_server/psws/python_service.py -> build/lib/tabpy/tabpy_server/psws
copying tabpy/VERSION -> build/lib/tabpy
copying tabpy/tabpy_server/state.ini.template -> build/lib/tabpy/tabpy_server
copying tabpy/tabpy_server/common/default.conf -> build/lib/tabpy/tabpy_server/common
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/tabpy
copying build/lib/tabpy/__init__.py -> build/bdist.linux-x86_64/egg/tabpy
copying build/lib/tabpy/tabpy.py -> build/bdist.linux-x86_64/egg/tabpy
creating build/bdist.linux-x86_64/egg/tabpy/models
copying build/lib/tabpy/models/__init__.py -> build/bdist.linux-x86_64/egg/tabpy/models
copying build/lib/tabpy/models/deploy_models.py -> build/bdist.linux-x86_64/egg/tabpy/models
creating build/bdist.linux-x86_64/egg/tabpy/models/scripts
copying build/lib/tabpy/models/scripts/PCA.py -> build/bdist.linux-x86_64/egg/tabpy/models/scripts
copying build/lib/tabpy/models/scripts/SentimentAnalysis.py -> build/bdist.linux-x86_64/egg/tabpy/models/scripts
copying build/lib/tabpy/models/scripts/__init__.py -> build/bdist.linux-x86_64/egg/tabpy/models/scripts
copying build/lib/tabpy/models/scripts/tTest.py -> build/bdist.linux-x86_64/egg/tabpy/models/scripts
creating build/bdist.linux-x86_64/egg/tabpy/models/utils
copying build/lib/tabpy/models/utils/__init__.py -> build/bdist.linux-x86_64/egg/tabpy/models/utils
copying build/lib/tabpy/models/utils/setup_utils.py -> build/bdist.linux-x86_64/egg/tabpy/models/utils
creating build/bdist.linux-x86_64/egg/tabpy/tabpy_server
copying build/lib/tabpy/tabpy_server/__init__.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_server
creating build/bdist.linux-x86_64/egg/tabpy/tabpy_server/app
copying build/lib/tabpy/tabpy_server/app/ConfigParameters.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_server/app
copying build/lib/tabpy/tabpy_server/app/SettingsParameters.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_server/app
copying build/lib/tabpy/tabpy_server/app/__init__.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_server/app
copying build/lib/tabpy/tabpy_server/app/app.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_server/app
copying build/lib/tabpy/tabpy_server/app/util.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_server/app
creating build/bdist.linux-x86_64/egg/tabpy/tabpy_server/common
copying build/lib/tabpy/tabpy_server/common/__init__.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_server/common
copying build/lib/tabpy/tabpy_server/common/endpoint_file_mgr.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_server/common
copying build/lib/tabpy/tabpy_server/common/messages.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_server/common
copying build/lib/tabpy/tabpy_server/common/util.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_server/common
copying build/lib/tabpy/tabpy_server/common/default.conf -> build/bdist.linux-x86_64/egg/tabpy/tabpy_server/common
creating build/bdist.linux-x86_64/egg/tabpy/tabpy_server/handlers
copying build/lib/tabpy/tabpy_server/handlers/__init__.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_server/handlers
copying build/lib/tabpy/tabpy_server/handlers/base_handler.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_server/handlers
copying build/lib/tabpy/tabpy_server/handlers/endpoint_handler.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_server/handlers
copying build/lib/tabpy/tabpy_server/handlers/endpoints_handler.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_server/handlers
copying build/lib/tabpy/tabpy_server/handlers/evaluation_plane_handler.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_server/handlers
copying build/lib/tabpy/tabpy_server/handlers/main_handler.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_server/handlers
copying build/lib/tabpy/tabpy_server/handlers/management_handler.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_server/handlers
copying build/lib/tabpy/tabpy_server/handlers/query_plane_handler.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_server/handlers
copying build/lib/tabpy/tabpy_server/handlers/service_info_handler.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_server/handlers
copying build/lib/tabpy/tabpy_server/handlers/status_handler.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_server/handlers
copying build/lib/tabpy/tabpy_server/handlers/upload_destination_handler.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_server/handlers
copying build/lib/tabpy/tabpy_server/handlers/util.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_server/handlers
creating build/bdist.linux-x86_64/egg/tabpy/tabpy_server/management
copying build/lib/tabpy/tabpy_server/management/__init__.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_server/management
copying build/lib/tabpy/tabpy_server/management/state.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_server/management
copying build/lib/tabpy/tabpy_server/management/util.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_server/management
creating build/bdist.linux-x86_64/egg/tabpy/tabpy_server/psws
copying build/lib/tabpy/tabpy_server/psws/__init__.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_server/psws
copying build/lib/tabpy/tabpy_server/psws/callbacks.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_server/psws
copying build/lib/tabpy/tabpy_server/psws/python_service.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_server/psws
copying build/lib/tabpy/tabpy_server/state.ini.template -> build/bdist.linux-x86_64/egg/tabpy/tabpy_server
creating build/bdist.linux-x86_64/egg/tabpy/tabpy_tools
copying build/lib/tabpy/tabpy_tools/__init__.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_tools
copying build/lib/tabpy/tabpy_tools/client.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_tools
copying build/lib/tabpy/tabpy_tools/custom_query_object.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_tools
copying build/lib/tabpy/tabpy_tools/query_object.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_tools
copying build/lib/tabpy/tabpy_tools/rest.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_tools
copying build/lib/tabpy/tabpy_tools/rest_client.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_tools
copying build/lib/tabpy/tabpy_tools/schema.py -> build/bdist.linux-x86_64/egg/tabpy/tabpy_tools
creating build/bdist.linux-x86_64/egg/tabpy/utils
copying build/lib/tabpy/utils/__init__.py -> build/bdist.linux-x86_64/egg/tabpy/utils
copying build/lib/tabpy/utils/user_management.py -> build/bdist.linux-x86_64/egg/tabpy/utils
copying build/lib/tabpy/VERSION -> build/bdist.linux-x86_64/egg/tabpy
byte-compiling build/bdist.linux-x86_64/egg/tabpy/__init__.py to __init__.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy.py to tabpy.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/models/__init__.py to __init__.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/models/deploy_models.py to deploy_models.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/models/scripts/PCA.py to PCA.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/models/scripts/SentimentAnalysis.py to SentimentAnalysis.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/models/scripts/__init__.py to __init__.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/models/scripts/tTest.py to tTest.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/models/utils/__init__.py to __init__.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/models/utils/setup_utils.py to setup_utils.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_server/__init__.py to __init__.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_server/app/ConfigParameters.py to ConfigParameters.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_server/app/SettingsParameters.py to SettingsParameters.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_server/app/__init__.py to __init__.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_server/app/app.py to app.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_server/app/util.py to util.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_server/common/__init__.py to __init__.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_server/common/endpoint_file_mgr.py to endpoint_file_mgr.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_server/common/messages.py to messages.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_server/common/util.py to util.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_server/handlers/__init__.py to __init__.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_server/handlers/base_handler.py to base_handler.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_server/handlers/endpoint_handler.py to endpoint_handler.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_server/handlers/endpoints_handler.py to endpoints_handler.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_server/handlers/evaluation_plane_handler.py to evaluation_plane_handler.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_server/handlers/main_handler.py to main_handler.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_server/handlers/management_handler.py to management_handler.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_server/handlers/query_plane_handler.py to query_plane_handler.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_server/handlers/service_info_handler.py to service_info_handler.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_server/handlers/status_handler.py to status_handler.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_server/handlers/upload_destination_handler.py to upload_destination_handler.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_server/handlers/util.py to util.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_server/management/__init__.py to __init__.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_server/management/state.py to state.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_server/management/util.py to util.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_server/psws/__init__.py to __init__.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_server/psws/callbacks.py to callbacks.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_server/psws/python_service.py to python_service.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_tools/__init__.py to __init__.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_tools/client.py to client.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_tools/custom_query_object.py to custom_query_object.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_tools/query_object.py to query_object.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_tools/rest.py to rest.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_tools/rest_client.py to rest_client.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/tabpy_tools/schema.py to schema.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/utils/__init__.py to __init__.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/tabpy/utils/user_management.py to user_management.cpython-36.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying tabpy.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying tabpy.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying tabpy.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying tabpy.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying tabpy.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying tabpy.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
tabpy.__pycache__.tabpy.cpython-36: module references __file__
tabpy.models.__pycache__.deploy_models.cpython-36: module references __file__
tabpy.models.utils.__pycache__.setup_utils.cpython-36: module references __file__
tabpy.tabpy_server.app.__pycache__.app.cpython-36: module references __file__
creating dist
creating 'dist/tabpy-0.8.6-py3.6.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing tabpy-0.8.6-py3.6.egg
creating /usr/local/lib/python3.6/site-packages/tabpy-0.8.6-py3.6.egg
Extracting tabpy-0.8.6-py3.6.egg to /usr/local/lib/python3.6/site-packages
Adding tabpy 0.8.6 to easy-install.pth file
Installing tabpy script to /usr/local/bin
Installing tabpy-deploy-models script to /usr/local/bin
Installing tabpy-user-management script to /usr/local/bin
Installed /usr/local/lib/python3.6/site-packages/tabpy-0.8.6-py3.6.egg
Processing dependencies for tabpy==0.8.6
Searching for urllib3==1.24.3
Best match: urllib3 1.24.3
Adding urllib3 1.24.3 to easy-install.pth file
Using /usr/local/lib/python3.6/site-packages
Searching for tornado==6.0.3
Best match: tornado 6.0.3
Adding tornado 6.0.3 to easy-install.pth file
Using /usr/local/lib64/python3.6/site-packages
Searching for six==1.12.0
Best match: six 1.12.0
Adding six 1.12.0 to easy-install.pth file
Using /usr/local/lib/python3.6/site-packages
Searching for singledispatch==3.4.0.3
Best match: singledispatch 3.4.0.3
Adding singledispatch 3.4.0.3 to easy-install.pth file
Using /usr/local/lib/python3.6/site-packages
Searching for requests==2.22.0
Best match: requests 2.22.0
Adding requests 2.22.0 to easy-install.pth file
Using /usr/local/lib/python3.6/site-packages
Searching for python-dateutil==2.8.0
Best match: python-dateutil 2.8.0
Adding python-dateutil 2.8.0 to easy-install.pth file
Using /usr/local/lib/python3.6/site-packages
Searching for pyOpenSSL==19.0.0
Best match: pyOpenSSL 19.0.0
Adding pyOpenSSL 19.0.0 to easy-install.pth file
Using /usr/local/lib/python3.6/site-packages
Searching for jsonschema==3.0.2
Best match: jsonschema 3.0.2
Adding jsonschema 3.0.2 to easy-install.pth file
Installing jsonschema script to /usr/local/bin
Using /usr/local/lib/python3.6/site-packages
Searching for genson==1.1.0
Best match: genson 1.1.0
Adding genson 1.1.0 to easy-install.pth file
Installing genson script to /usr/local/bin
Using /usr/local/lib/python3.6/site-packages
Searching for future==0.17.1
Best match: future 0.17.1
Adding future 0.17.1 to easy-install.pth file
Installing futurize script to /usr/local/bin
Installing pasteurize script to /usr/local/bin
Using /usr/local/lib/python3.6/site-packages
Searching for decorator==4.4.0
Best match: decorator 4.4.0
Adding decorator 4.4.0 to easy-install.pth file
Using /usr/local/lib/python3.6/site-packages
Searching for configparser==4.0.2
Best match: configparser 4.0.2
Adding configparser 4.0.2 to easy-install.pth file
Using /usr/local/lib/python3.6/site-packages
Searching for cloudpickle==1.2.2
Best match: cloudpickle 1.2.2
Adding cloudpickle 1.2.2 to easy-install.pth file
Using /usr/local/lib/python3.6/site-packages
Searching for backports-abc==0.5
Best match: backports-abc 0.5
Adding backports-abc 0.5 to easy-install.pth file
Using /usr/local/lib/python3.6/site-packages
Searching for certifi==2019.9.11
Best match: certifi 2019.9.11
Adding certifi 2019.9.11 to easy-install.pth file
Using /usr/local/lib/python3.6/site-packages
Searching for idna==2.8
Best match: idna 2.8
Adding idna 2.8 to easy-install.pth file
Using /usr/local/lib/python3.6/site-packages
Searching for chardet==3.0.4
Best match: chardet 3.0.4
Adding chardet 3.0.4 to easy-install.pth file
Installing chardetect script to /usr/local/bin
Using /usr/local/lib/python3.6/site-packages
Searching for cryptography==2.7
Best match: cryptography 2.7
Adding cryptography 2.7 to easy-install.pth file
Using /usr/local/lib64/python3.6/site-packages
Searching for setuptools==41.2.0
Best match: setuptools 41.2.0
Adding setuptools 41.2.0 to easy-install.pth file
Installing easy_install script to /usr/local/bin
Installing easy_install-3.6 script to /usr/local/bin
Using /usr/local/lib/python3.6/site-packages
Searching for attrs==19.2.0
Best match: attrs 19.2.0
Adding attrs 19.2.0 to easy-install.pth file
Using /usr/local/lib/python3.6/site-packages
Searching for pyrsistent==0.15.4
Best match: pyrsistent 0.15.4
Adding pyrsistent 0.15.4 to easy-install.pth file
Using /usr/local/lib64/python3.6/site-packages
Searching for asn1crypto==0.24.0
Best match: asn1crypto 0.24.0
Adding asn1crypto 0.24.0 to easy-install.pth file
Using /usr/local/lib/python3.6/site-packages
Searching for cffi==1.12.3
Best match: cffi 1.12.3
Adding cffi 1.12.3 to easy-install.pth file
Using /usr/local/lib64/python3.6/site-packages
Searching for pycparser==2.19
Best match: pycparser 2.19
Adding pycparser 2.19 to easy-install.pth file
Using /usr/local/lib/python3.6/site-packages
Finished processing dependencies for tabpy==0.8.6
- Start tabpy
$ tabpy
2019-10-02,04:42:56 [DEBUG] (app.py:app:203): Parameter port set to "9004" from default value
2019-10-02,04:42:56 [DEBUG] (app.py:app:203): Parameter server_version set to "0.8.6" from default value
2019-10-02,04:42:56 [DEBUG] (app.py:app:203): Parameter evaluate_timeout set to "30" from default value
2019-10-02,04:42:56 [DEBUG] (app.py:app:203): Parameter upload_dir set to "/usr/local/lib/python3.6/site-packages/tabpy/tmp/query_objects" from default value
2019-10-02,04:42:56 [DEBUG] (app.py:app:203): Parameter transfer_protocol set to "http" from default value
2019-10-02,04:42:56 [DEBUG] (app.py:app:209): Parameter certificate_file is not set
2019-10-02,04:42:56 [DEBUG] (app.py:app:209): Parameter key_file is not set
2019-10-02,04:42:56 [DEBUG] (app.py:app:203): Parameter state_file_path set to "/usr/local/lib/python3.6/site-packages/tabpy/tabpy_server" from default value
2019-10-02,04:42:56 [INFO] (app.py:app:269): Loading state from state file /usr/local/lib/python3.6/site-packages/tabpy/tabpy_server/state.ini
2019-10-02,04:42:56 [DEBUG] (app.py:app:203): Parameter static_path set to "./" from default value
2019-10-02,04:42:56 [DEBUG] (app.py:app:281): Static pages folder set to "/home/anhnt3"
2019-10-02,04:42:56 [DEBUG] (app.py:app:209): Parameter TABPY_PWD_FILE is not set
2019-10-02,04:42:56 [INFO] (app.py:app:300): Password file is not specified: Authentication is not enabled
2019-10-02,04:42:56 [DEBUG] (app.py:app:203): Parameter log_request_context set to "false" from default value
2019-10-02,04:42:56 [INFO] (app.py:app:316): Call context logging is disabled
2019-10-02,04:42:56 [INFO] (app.py:app:89): Initializing TabPy...
2019-10-02,04:42:56 [DEBUG] (selector_events.py:selector_events:54): Using selector: EpollSelector
2019-10-02,04:42:56 [INFO] (callbacks.py:callbacks:42): Initializing TabPy Server...
2019-10-02,04:42:56 [DEBUG] (state.py:state:147): Collected endpoints: {}
2019-10-02,04:42:56 [INFO] (app.py:app:92): Done initializing TabPy.
2019-10-02,04:42:56 [INFO] (callbacks.py:callbacks:62): Initializing models...
2019-10-02,04:42:56 [DEBUG] (state.py:state:147): Collected endpoints: {}
2019-10-02,04:42:56 [INFO] (app.py:app:84): Web service listening on port 9004
- Thực hiện deploy model
Mỗi model trong tabpy sẽ định nghĩa 1 hoặc nhiều function để đảm nhiệm thực hiện tính toán 1 công việc từ Table Desktop
$ tabpy-deploy-models
Requirement already satisfied: sklearn in /usr/local/lib/python3.6/site-packages
Requirement already satisfied: pandas in /usr/local/lib64/python3.6/site-packages
Requirement already satisfied: numpy in /usr/local/lib64/python3.6/site-packages
Requirement already satisfied: textblob in /usr/local/lib/python3.6/site-packages
Requirement already satisfied: nltk in /usr/local/lib/python3.6/site-packages
Requirement already satisfied: scipy in /usr/local/lib64/python3.6/site-packages
Requirement already satisfied: scikit-learn in /usr/local/lib64/python3.6/site-packages (from sklearn)
Requirement already satisfied: python-dateutil>=2.6.1 in /usr/local/lib/python3.6/site-packages (from pandas)
Requirement already satisfied: pytz>=2017.2 in /usr/local/lib/python3.6/site-packages (from pandas)
Requirement already satisfied: six in /usr/local/lib/python3.6/site-packages (from nltk)
Requirement already satisfied: joblib>=0.11 in /usr/local/lib/python3.6/site-packages (from scikit-learn->sklearn)
==================================================================
Using config file at /usr/local/lib/python3.6/site-packages/tabpy/tabpy_server/common/default.conf
Successfully deployed PCA
Successfully deployed Sentiment Analysis
Successfully deployed ttest
/usr/bin/python3: can't find '__main__' module in '/usr/local/lib/python3.6/site-packages/tabpy/models/scripts/__pycache__'
Successfully deployed add
III. Connect Tableau Desktop với Tabpy
Tableau Desktop > Help > Settings and Performance > Manage External Service Connection. Nhập Server Name and UserName => Click OK