Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong psycopg2 version #134

Open
thiagoluigi7 opened this issue Dec 16, 2021 · 1 comment
Open

Wrong psycopg2 version #134

thiagoluigi7 opened this issue Dec 16, 2021 · 1 comment

Comments

@thiagoluigi7
Copy link

Description of change

Hi, I was looking at the last commit 'Revert "Bump python 396 (#130)" (#131)' and I have noticed that on the circleCI config.yml psycopg2==2.8.4 is used but on the setup.py file psycopg2==2.7.4 is used. I think it was a typo.

@ckshitij
Copy link

ckshitij commented Jan 4, 2022

I guess due to this the pip installation is failing with the below error:

Running psycopg2-2.7.4/setup.py -q bdist_egg --dist-dir /var/folders/0r/88_3g8ls3t57ryyqx6vqxzfm0000gn/T/easy_install-bsmaos35/psycopg2-2.7.4/egg-dist-tmp-pt3w40k6
psycopg/psycopgmodule.c:685:18: error: incomplete definition of type 'struct _is'
    while (interp->next)
           ~~~~~~^
/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/pystate.h:20:8: note: forward declaration of 'struct _is'
struct _is;
       ^
psycopg/psycopgmodule.c:686:24: error: incomplete definition of type 'struct _is'
        interp = interp->next;
                 ~~~~~~^
/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/pystate.h:20:8: note: forward declaration of 'struct _is'
struct _is;
       ^
2 errors generated.

It appears you are missing some prerequisite to build the package from source.

You may install a binary package by installing 'psycopg2-binary' from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.

For further information please check the 'doc/src/install.rst' file (also at
<http://initd.org/psycopg/docs/install.html>).
error: Setup script exited with error: command 'clang' failed with exit status 1

I have update the psycopg2 version in setup.py with latest version [2.9.3], it worked fine, but got other issue for mac osx which is mentioned below:

error: Setup script exited with error: SandboxViolation: mkdir('/private/var/root/Library/Caches/com.apple.python/private', 511) {}

The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.

This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand.  Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.

It worked for psycopg==2.9.3 and was failing for psycopg==2.7.3 and psycopg==2.8.4 as well, I used python 3.8.2.

Setup.py

url='https://singer.io',
      classifiers=['Programming Language :: Python :: 3 :: Only'],
      install_requires=[
          'singer-python==5.3.1',
          'psycopg2==2.9.3',
          'strict-rfc3339==0.7',
      ],
      extras_require={

astrojuanlu added a commit to astrojuanlu/singer-io-tap-postgres that referenced this issue May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants