holzschu / holzschu/Carnets

Need to access PostgreSQL database, anyone have a work around until this can, perhaps, be fixed?

Open
#191 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
634
Forks
44
PR merge metrics
No merged PRs in 30d

Description

I would love to do some data science with my data, which hides out in a database. I don’t have an elegant option for importing, and then selecting, data to my iPad.

I tried !pip install psychopg2, it complained about not being able to build from source and told me to get psychopg2-binary. Which I did. Nothing seemed to get over the dependency for pg_config, which, I suspect, might be usually be sitting where the DB resides. Since my DB is in Google’s cloud, I can’t see if I can somehow import it into Carnets. I don’t even know if it is Python3 or not.

Using cached psycopg2-binary-2.7.4.tar.gz (426 kB)

    writing top-level names to /private/var/mobile/Containers/Data/Application/B6DC8ED3-C27B-4C4A-9FA6-8FD130DFBC96/tmp/pip-pip-egg-info-gyt2it54/psycopg2_binary.egg-info/top_level.txt
    writing manifest file '/private/var/mobile/Containers/Data/Application/B6DC8ED3-C27B-4C4A-9FA6-8FD130DFBC96/tmp/pip-pip-egg-info-gyt2it54/psycopg2_binary.egg-info/SOURCES.txt'
    
    Error: pg_config executable not found.
    
    pg_config is required to build psycopg2 from source.  Please add the directory
    containing pg_config to the $PATH or specify the full executable path with the
    option:
    
        python setup.py build_ext --pg-config /path/to/pg_config build ...
    
    or with the pg_config option in 'setup.cfg'.
    
    If you prefer to avoid building psycopg2 from source, please install the PyPI
    'psycopg2-binary' package instead.
    
    For further information please check the 'doc/src/install.rst' file (also at
    <http://initd.org/psycopg/docs/install.html>).

etc. etc.

It complains Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

I don’t thing pg_config is going to be in the logs. Just curious, however, where they are and how to read them.

Finally, it belabors the point, totally ignoring the fact that I already took this little morsel of advice and got nowhere:

Error: pg_config executable not found.
    
    pg_config is required to build psycopg2 from source.  Please add the directory
    containing pg_config to the $PATH or specify the full executable path with the
    option:
    
        python setup.py build_ext --pg-config /path/to/pg_config build ...
    
    or with the pg_config option in 'setup.cfg'.
    
    If you prefer to avoid building psycopg2 from source, please install the PyPI
    'psycopg2-binary' package instead.
    
    For further information please check the 'doc/src/install.rst' file (also at
    <http://initd.org/psycopg/docs/install.html>).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the pip install psycopg2 and psycopg2-binary attempts in Carnets on iPad, focusing on the reported pg_config executable not found output. No source file or test is named; the issue is complete only when a defined PostgreSQL access path works in Carnets and the dependency or error behavior is covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, postgresql, python
Domain
databases, mobile
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.