Q - สอบถามวิธีการ ติดตั้ง pgAmin4 หน่อยครับ

เกี่ยวกับ ปัญหาการใช้งาน การติดตั้ง ฐานข้อมูล MySql Oracle MSSQL ect...
การเขียน คำสั่ง SQL เพื่อดึกข้อมูล บอร์ดนี้ควรระบุโครงสร้างตารางของท่านในคำถามด้วยนะ

Moderator: mindphp

tatiya
PHP VIP Members
PHP VIP Members
โพสต์: 2845
ลงทะเบียนเมื่อ: 09/07/2018 9:35 am

Q - สอบถามวิธีการ ติดตั้ง pgAmin4 หน่อยครับ

โพสต์ที่ยังไม่ได้อ่าน โดย tatiya »

คือตอนนี้ผมต้องการติดตั้ง pgAdmin4 ครับ ผมใช้ระบบปฏิบัติการ Ubuntu 14.04 LST ครับ python2.7 คือผมได้ศึกษาจากอินเตอร์เน็ตมานิดหน่อยและลองทำตามแล้วติด Error ครับ ขั้นตอนที่ผมทำมีดังนี้ครับ

1. อัฟเดรต

โค้ด: เลือกทั้งหมด

sudo apt-get update
Work_for_use-dist_094.png
Work_for_use-dist_094.png (110.98 KiB) Viewed 1924 times
2. การจะติดตั้งต้องมีประมาณ 3 อย่าง เช่น virtualenv, pip, dev

โค้ด: เลือกทั้งหมด

sudo apt-get install build-essential libssl-dev libffi-dev libgmp3-dev
virtualenv python-pip libpq-dev python-dev
Work_for_use-dist_094.png
Work_for_use-dist_094.png (110.98 KiB) Viewed 1924 times
3. แล้วก็สร้าง

โค้ด: เลือกทั้งหมด

$ mkdir pgAdmin4
cd pgAdmin4
virtualenv pgAdmin4
จะได้ ตัวนี้ขึ้นมา
Selection_105.png
Selection_105.png (3.42 KiB) Viewed 1924 times
4. ต่อไปเป็น Ativate โฟลเดอร์ bin

โค้ด: เลือกทั้งหมด

cd pgAdmin4
source bin/activate
ผลลัพท์
Selection_103.png
Selection_103.png (14.05 KiB) Viewed 1923 times
5. ทำการดาวน์โหลด

โค้ด: เลือกทั้งหมด

wget https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v2.1/pip/pgadmin4-
2.1-py2.py3-none-any.whl
6. แล้วก็ติดตั้ง

โค้ด: เลือกทั้งหมด

pip install pgadmin4-2.1-py2.py3-none-any.whl
ผลลัพท์ ก็คือ
pgAdmin4_104.png
pgAdmin4_104.png (61.97 KiB) Viewed 1924 times

โค้ด: เลือกทั้งหมด

com008@com008-K45A:~/pgAdmin4/pgAdmin4$ pip install pgadmin4-3.3-py2.py3-none-any.whl
Unpacking ./pgadmin4-3.3-py2.py3-none-any.whl
Downloading/unpacking Flask-Gravatar==0.5.0 (from pgadmin4==3.3)
  Downloading Flask_Gravatar-0.5.0-py2.py3-none-any.whl
Downloading/unpacking backports.csv==1.0.5 (from pgadmin4==3.3)
  Downloading backports.csv-1.0.5-py2.py3-none-any.whl
Downloading/unpacking Flask==0.12.2 (from pgadmin4==3.3)
  Downloading Flask-0.12.2-py2.py3-none-any.whl (83kB): 83kB downloaded
Downloading/unpacking importlib==1.0.3 (from pgadmin4==3.3)
  Downloading importlib-1.0.3.tar.bz2
  Running setup.py (path:/tmp/pip_build_com008/importlib/setup.py) egg_info for package importlib
    
Downloading/unpacking Flask-HTMLmin==1.3.2 (from pgadmin4==3.3)
  Downloading Flask-HTMLmin-1.3.2.tar.gz
  Running setup.py (path:/tmp/pip_build_com008/Flask-HTMLmin/setup.py) egg_info for package Flask-HTMLmin
    
Downloading/unpacking sshtunnel>=0.1.3 (from pgadmin4==3.3)
  Downloading sshtunnel-0.1.4.tar.gz (48kB): 48kB downloaded
  Running setup.py (path:/tmp/pip_build_com008/sshtunnel/setup.py) egg_info for package sshtunnel
    
Downloading/unpacking sqlparse==0.2.4 (from pgadmin4==3.3)
  Downloading sqlparse-0.2.4-py2.py3-none-any.whl
Downloading/unpacking python-mimeparse==1.6.0 (from pgadmin4==3.3)
  Downloading python_mimeparse-1.6.0-py2.py3-none-any.whl
Downloading/unpacking six>=1.11.0 (from pgadmin4==3.3)
  Downloading six-1.11.0-py2.py3-none-any.whl
Downloading/unpacking Flask-Login==0.3.2 (from pgadmin4==3.3)
  Downloading Flask-Login-0.3.2.tar.gz
  Running setup.py (path:/tmp/pip_build_com008/Flask-Login/setup.py) egg_info for package Flask-Login
    
Downloading/unpacking WTForms==2.1 (from pgadmin4==3.3)
  Downloading WTForms-2.1.zip (553kB): 553kB downloaded
  Running setup.py (path:/tmp/pip_build_com008/WTForms/setup.py) egg_info for package WTForms
    
    warning: no previously-included files matching '*' found under directory 'docs/_build'
    warning: no previously-included files matching '*.pyc' found under directory 'tests'
Downloading/unpacking Flask-SQLAlchemy==2.3.2 (from pgadmin4==3.3)
  Downloading Flask_SQLAlchemy-2.3.2-py2.py3-none-any.whl
Downloading/unpacking python-dateutil>=2.7.1 (from pgadmin4==3.3)
  Downloading python_dateutil-2.7.3-py2.py3-none-any.whl (211kB): 211kB downloaded
Downloading/unpacking Flask-Paranoid==0.2.0 (from pgadmin4==3.3)
  Downloading Flask_Paranoid-0.2.0-py2.py3-none-any.whl
Downloading/unpacking Flask-Security>=3.0.0 (from pgadmin4==3.3)
  Downloading Flask_Security-3.0.0-py2.py3-none-any.whl (68kB): 68kB downloaded
Downloading/unpacking SQLAlchemy>=1.2.5 (from pgadmin4==3.3)
  Downloading SQLAlchemy-1.2.11.tar.gz (5.6MB): 5.6MB downloaded
  Running setup.py (path:/tmp/pip_build_com008/SQLAlchemy/setup.py) egg_info for package SQLAlchemy
    
    warning: no files found matching '*.jpg' under directory 'doc'
    warning: no files found matching '*.mako' under directory 'doc'
    warning: no files found matching 'distribute_setup.py'
    warning: no files found matching 'sa2to3.py'
    warning: no files found matching 'ez_setup.py'
    no previously-included directories found matching 'doc/build/output'
Downloading/unpacking html5lib==1.0.1 (from pgadmin4==3.3)
  Downloading html5lib-1.0.1-py2.py3-none-any.whl (117kB): 117kB downloaded
Downloading/unpacking Flask-Principal==0.4.0 (from pgadmin4==3.3)
  Downloading Flask-Principal-0.4.0.tar.gz
  Running setup.py (path:/tmp/pip_build_com008/Flask-Principal/setup.py) egg_info for package Flask-Principal
    
Downloading/unpacking htmlmin==0.1.12 (from pgadmin4==3.3)
  Downloading htmlmin-0.1.12.tar.gz
  Running setup.py (path:/tmp/pip_build_com008/htmlmin/setup.py) egg_info for package htmlmin
    
    no previously-included directories found matching 'htmlmin/tests'
Downloading/unpacking pbr==3.1.1 (from pgadmin4==3.3)
  Downloading pbr-3.1.1-py2.py3-none-any.whl (99kB): 99kB downloaded
Downloading/unpacking pytz==2018.3 (from pgadmin4==3.3)
  Downloading pytz-2018.3-py2.py3-none-any.whl (509kB): 509kB downloaded
Downloading/unpacking speaklater==1.3 (from pgadmin4==3.3)
  Downloading speaklater-1.3.tar.gz
  Running setup.py (path:/tmp/pip_build_com008/speaklater/setup.py) egg_info for package speaklater
    
Downloading/unpacking extras==1.0.0 (from pgadmin4==3.3)
  Downloading extras-1.0.0-py2.py3-none-any.whl
Downloading/unpacking linecache2==1.0.0 (from pgadmin4==3.3)
  Downloading linecache2-1.0.0-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): pycrypto>=2.6.1 in /usr/lib/python2.7/dist-packages (from pgadmin4==3.3)
Downloading/unpacking Flask-Migrate==2.1.1 (from pgadmin4==3.3)
  Downloading Flask_Migrate-2.1.1-py2.py3-none-any.whl
Downloading/unpacking Flask-Mail==0.9.1 (from pgadmin4==3.3)
  Downloading Flask-Mail-0.9.1.tar.gz (45kB): 45kB downloaded
  Running setup.py (path:/tmp/pip_build_com008/Flask-Mail/setup.py) egg_info for package Flask-Mail
    
    warning: no previously-included files matching '*.pyc' found under directory 'docs'
    warning: no previously-included files matching '*.pyo' found under directory 'docs'
    no previously-included directories found matching 'docs/_build'
    no previously-included directories found matching 'docs/_themes/.git'
Downloading/unpacking psycopg2>=2.7.4 (from pgadmin4==3.3)
  Downloading psycopg2-2.7.5.tar.gz (426kB): 426kB downloaded
  Running setup.py (path:/tmp/pip_build_com008/psycopg2/setup.py) egg_info for package psycopg2
    
Downloading/unpacking simplejson==3.13.2 (from pgadmin4==3.3)
  Downloading simplejson-3.13.2.tar.gz (79kB): 79kB downloaded
  Running setup.py (path:/tmp/pip_build_com008/simplejson/setup.py) egg_info for package simplejson
    
Downloading/unpacking fixtures==3.0.0 (from pgadmin4==3.3)
  Downloading fixtures-3.0.0-py2.py3-none-any.whl (67kB): 67kB downloaded
Downloading/unpacking pyrsistent==0.14.2 (from pgadmin4==3.3)
  Downloading pyrsistent-0.14.2.tar.gz (97kB): 97kB downloaded
  Running setup.py (path:/tmp/pip_build_com008/pyrsistent/setup.py) egg_info for package pyrsistent
    
Downloading/unpacking Flask-WTF==0.14.2 (from pgadmin4==3.3)
  Downloading Flask_WTF-0.14.2-py2.py3-none-any.whl
Downloading/unpacking blinker==1.4 (from pgadmin4==3.3)
  Downloading blinker-1.4.tar.gz (111kB): 111kB downloaded
  Running setup.py (path:/tmp/pip_build_com008/blinker/setup.py) egg_info for package blinker
    
Downloading/unpacking passlib==1.7.1 (from pgadmin4==3.3)
  Downloading passlib-1.7.1-py2.py3-none-any.whl (498kB): 498kB downloaded
Downloading/unpacking itsdangerous>=0.21 (from Flask==0.12.2->pgadmin4==3.3)
  Downloading itsdangerous-0.24.tar.gz (46kB): 46kB downloaded
  Running setup.py (path:/tmp/pip_build_com008/itsdangerous/setup.py) egg_info for package itsdangerous
    
    warning: no previously-included files matching '*' found under directory 'docs/_build'
Requirement already satisfied (use --upgrade to upgrade): Werkzeug>=0.7 in /usr/lib/python2.7/dist-packages (from Flask==0.12.2->pgadmin4==3.3)
Requirement already satisfied (use --upgrade to upgrade): Jinja2>=2.4 in /usr/lib/python2.7/dist-packages (from Flask==0.12.2->pgadmin4==3.3)
Downloading/unpacking click>=2.0 (from Flask==0.12.2->pgadmin4==3.3)
  Downloading click-6.7-py2.py3-none-any.whl (71kB): 71kB downloaded
Downloading/unpacking paramiko>=1.15.2 (from sshtunnel>=0.1.3->pgadmin4==3.3)
  Downloading paramiko-2.4.1-py2.py3-none-any.whl (194kB): 194kB downloaded
Downloading/unpacking Flask-BabelEx>=0.9.3 (from Flask-Security>=3.0.0->pgadmin4==3.3)
  Downloading Flask-BabelEx-0.9.3.tar.gz (41kB): 41kB downloaded
  Running setup.py (path:/tmp/pip_build_com008/Flask-BabelEx/setup.py) egg_info for package Flask-BabelEx
    
    warning: no previously-included files matching '*.pyc' found under directory 'tests'
    warning: no previously-included files matching '*.pyo' found under directory 'tests'
    warning: no previously-included files matching '*.pyc' found under directory 'docs'
    warning: no previously-included files matching '*.pyo' found under directory 'docs'
    no previously-included directories found matching 'docs/_build'
    no previously-included directories found matching 'docs/_themes/.git'
Downloading/unpacking webencodings (from html5lib==1.0.1->pgadmin4==3.3)
  Downloading webencodings-0.5.1-py2.py3-none-any.whl
Downloading/unpacking alembic>=0.6 (from Flask-Migrate==2.1.1->pgadmin4==3.3)
  Downloading alembic-1.0.0-py2.py3-none-any.whl (158kB): 158kB downloaded
Downloading/unpacking testtools>=0.9.22 (from fixtures==3.0.0->pgadmin4==3.3)
  Downloading testtools-2.3.0-py2.py3-none-any.whl (184kB): 184kB downloaded
Requirement already satisfied (use --upgrade to upgrade): markupsafe in /usr/lib/python2.7/dist-packages (from Jinja2>=2.4->Flask==0.12.2->pgadmin4==3.3)
Downloading/unpacking pyasn1>=0.1.7 (from paramiko>=1.15.2->sshtunnel>=0.1.3->pgadmin4==3.3)
  Downloading pyasn1-0.4.4-py2.py3-none-any.whl (72kB): 72kB downloaded
Downloading/unpacking bcrypt>=3.1.3 (from paramiko>=1.15.2->sshtunnel>=0.1.3->pgadmin4==3.3)
  Downloading bcrypt-3.1.4.tar.gz (42kB): 42kB downloaded
  Running setup.py (path:/tmp/pip_build_com008/bcrypt/setup.py) egg_info for package bcrypt
    
    warning: no previously-included files found matching 'requirements.txt'
    warning: no previously-included files found matching 'tasks.py'
    warning: no previously-included files found matching '.travis.yml'
    warning: no previously-included files found matching 'wheel-scripts'
    warning: no previously-included files found matching 'Jenkinsfile'
    warning: no previously-included files found matching '.jenkins'
    warning: no previously-included files matching '*' found under directory '.jenkins'
    warning: no previously-included files matching '*' found under directory 'wheel-scripts'
    no previously-included directories found matching '.travis'
Downloading/unpacking pynacl>=1.0.1 (from paramiko>=1.15.2->sshtunnel>=0.1.3->pgadmin4==3.3)
  Downloading PyNaCl-1.2.1.tar.gz (3.3MB): 3.3MB downloaded
  Running setup.py (path:/tmp/pip_build_com008/pynacl/setup.py) egg_info for package pynacl
    
    Installed /tmp/pip_build_com008/pynacl/cffi-1.11.5-py2.7-linux-x86_64.egg
    Searching for pycparser
    Reading https://pypi.python.org/simple/pycparser/
    Best match: pycparser 2.18
    Downloading https://files.pythonhosted.org/packages/8c/2d/aad7f16146f4197a11f8e91fb81df177adcc2073d36a17b1491fd09df6ed/pycparser-2.18.tar.gz#sha256=99a8ca03e29851d96616ad0404b4aad7d9ee16f25c9f9708a11faf2810f7b226
    Processing pycparser-2.18.tar.gz
    Writing /tmp/easy_install-l13_VU/pycparser-2.18/setup.cfg
    Running pycparser-2.18/setup.py -q bdist_egg --dist-dir /tmp/easy_install-l13_VU/pycparser-2.18/egg-dist-tmp-YLql8m
    warning: no previously-included files matching 'yacctab.*' found under directory 'tests'
    warning: no previously-included files matching 'lextab.*' found under directory 'tests'
    warning: no previously-included files matching 'yacctab.*' found under directory 'examples'
    warning: no previously-included files matching 'lextab.*' found under directory 'examples'
    zip_safe flag not set; analyzing archive contents...
    pycparser.ply.yacc: module references __file__
    pycparser.ply.yacc: module MAY be using inspect.getsourcefile
    pycparser.ply.yacc: module MAY be using inspect.stack
    pycparser.ply.lex: module references __file__
    pycparser.ply.lex: module MAY be using inspect.getsourcefile
    pycparser.ply.ygen: module references __file__
    
    Installed /tmp/pip_build_com008/pynacl/pycparser-2.18-py2.7.egg
    
    warning: no previously-included files matching '__pycache__/*' found anywhere in distribution
    warning: no previously-included files found matching '.travis.yml'
    warning: no previously-included files found matching '.travis'
    warning: no previously-included files found matching '.travis/install.sh'
    warning: no previously-included files found matching '.travis/run.sh'
    warning: no previously-included files found matching '.readthedocs.yml'
    warning: no previously-included files found matching '.coveragerc'
    warning: no previously-included files found matching 'tasks.py'
    warning: no previously-included files found matching 'Jenkinsfile'
    warning: no previously-included files found matching '.jenkins'
    warning: no previously-included files found matching '.jenkins/Jenkinsfile-pynacl-wheel-builder'
Downloading/unpacking cryptography>=1.5 (from paramiko>=1.15.2->sshtunnel>=0.1.3->pgadmin4==3.3)
  Downloading cryptography-2.3.1.tar.gz (449kB): 449kB downloaded
  Running setup.py (path:/tmp/pip_build_com008/cryptography/setup.py) egg_info for package cryptography
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip_build_com008/cryptography/setup.py", line 28, in <module>
        "cryptography requires setuptools 18.5 or newer, please upgrade to a "
    RuntimeError: cryptography requires setuptools 18.5 or newer, please upgrade to a newer version of setuptools
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pip_build_com008/cryptography/setup.py", line 28, in <module>

    "cryptography requires setuptools 18.5 or newer, please upgrade to a "

RuntimeError: cryptography requires setuptools 18.5 or newer, please upgrade to a newer version of setuptools

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_com008/cryptography
Storing debug log for failure in /tmp/tmp9m2X_e

ผู้ใช้งานขณะนี้

สมาชิกกำลังดูบอร์ดนี้: ไม่มีสมาชิกใหม่ และบุคลทั่วไป 64