psycopg2 Questions
6
Solved
I'm trying to build a Flask app using Postgres with Docker. I'd like to connect to an AWS RDS instance of Postgres, but use Docker for my Flask app. However, when trying to set up psycopg2 it runs ...
Victoriavictorian asked 12/10, 2017 at 14:17
2
Solved
I am installing psycopg2 into a python venv through poetry poetry add psycopg2 but i get the below error.
I have tried to use older versions of psycopg2. Does anyone know why this problem occurs an...
Choice asked 28/12, 2023 at 14:38
14
I was trying to install postgres for a tutorial, but pip gives me error:
pip install psycopg
A snip of error I get:
Error: pg_config executable not found.
Please add the directory containing p...
Knot asked 24/11, 2013 at 3:55
7
Solved
In one folder I have 3 files: base.py, Dockerfile and docker-compose.yml.
base.py:
import psycopg2
conn = psycopg2.connect("dbname='base123' user='postgres' host='db' password='pw1234'")
Docke...
Squander asked 8/8, 2018 at 15:43
21
I need to insert multiple rows with one query (number of rows is not constant), so I need to execute query like this one:
INSERT INTO t (a, b) VALUES (1, 2), (3, 4), (5, 6);
The only way I know ...
Incase asked 15/11, 2011 at 10:9
2
I have a python application which uses postgres and works fine in a conda envirnment based on python 3.7.3.
I am trying to update its conda environment to use a newer python version.
I built the ne...
Monticule asked 7/12, 2023 at 10:28
3
pip version: 23.1.1
Python version: 3.9.11
OS: Windows 11
My python project is created and env is used as virtual environment. psycopg2 fails to install.
According to log, "Failed building whe...
Eiderdown asked 22/4, 2023 at 12:18
37
Solved
I'm using virtualenv and I need to install "psycopg2".
I have done the following:
pip install http://pypi.python.org/packages/source/p/psycopg2/psycopg2-2.4.tar.gz#md5=24f4368e2cfdc1a2b03282ddda8...
Fulgurating asked 24/3, 2011 at 14:33
4
Solved
I am trying to connect to my redshift cluster using Sqlalchemy in a linux environment, but i am facing the following issue.
from sqlalchemy import create_engine
import pandas as pd
conn = create_e...
Ephod asked 22/6, 2023 at 14:22
4
Currently on MacOS Monterey working with Django 4.0 and Python 3.10.0. After running the command
python3 manage.py runserver
I get this error
ImproperlyConfigured("Error loading psycopg2 modu...
8
I cannot install psycopg2 on my M1 Mac and I used pip3.
When I tried to install with pip3 install psycopg2 The output like that:
ERROR: Command errored out with exit status 1:
command: /opt/homeb...
Throwaway asked 31/3, 2021 at 12:40
6
I am trying to execute 'flask run' in the Downloads directory where my Flask_App resides. My Flask_App is 'applications.py'. When I execute 'flask run' in the development environment I am getting a...
Canonicity asked 27/7, 2019 at 23:8
2
I cannot get psycopg2-binary package to install via poetry in python3.12.
pyproject.toml
[tool.poetry]
name = "my_project"
[tool.poetry.dependencies]
psycopg2-binary = "*"
[b...
Gloss asked 9/11, 2023 at 15:3
20
I'm attempting to make a website with a few others for the first time, and have run into a weird error when trying to use Django/Python/VirtualEnv. I've found solutions to this problem for other op...
Boylston asked 16/12, 2015 at 5:52
18
Presently, I'm attempting to configure Django for use on a project, and am encountering a persistent error when I try to run python manage.py syncdb.
File "/x/x/x/x/x/x/base.py", line 23, in ?
ra...
Cryogen asked 23/11, 2011 at 5:49
1
I am trying to insert data into users table:
cursor.execute("""CREATE TABLE IF NOT EXISTS users (
name TEXT NOT NULL,
id BIGINT NOT NULL,
xp INT NOT NULL
)""")
...
Gamopetalous asked 20/11, 2021 at 9:16
1
Solved
I see references to both psycopg2 and psycopg3, but no clear guidance wrt a roadmap for transitioning between the two. I see that over time there is a large body of SO questions regarding psycopg2....
22
I am trying to set up a PostgreSQL database for my django project, which I believe I have done now thanks to the replies to my last question Problems setting up a postgreSQL database for a django p...
Armagh asked 4/10, 2012 at 13:8
5
I'm trying to run a python application that uses psycopg2-binary==2.9.1, but I'm hitting this error:
psycopg2.OperationalError: SCRAM authentication requires libpq version 10 or above
When I check...
Gorman asked 14/10, 2021 at 15:21
6
I am updating a medium-sized project to Django 3.0 and I am encountering several errors in my tests after doing nothing more than bumping the Django version from 2.3.
The whole test suite has been...
5
Solved
I am using Docker to "containerize" a PostgreSQL deployment. I can spin up the container and connect to PostgreSQL via the command line as shown below:
minime2@CEBERUS:~/Projects/skunkworks$ docke...
Americaamerican asked 30/1, 2018 at 13:29
5
Solved
I have installed the psycopg2 with this command in my package folder :
pip install --target ./package psycopg2 # Or
pip install -t ./package psycopg2
now psycopg2 module is in my package and I hav...
Carnahan asked 16/3, 2022 at 7:56
7
I'm getting the following error from psycopg2:
Traceback (most recent call last): File "test1.py", line 1, in
<module>
import psycopg2 File "/Users/xxx/Library/Python/2.7/lib/python/site-pa...
5
Solved
I'm trying to install psycopg2 on CentOS, I followed everything on this tutorial from "On with it: Installing Python 2.6" all the way to when it imports psycopg2, but when I try to import I get the...
Shaper asked 27/1, 2011 at 19:49
5
Solved
What is the correct method to have the list (countryList) be available via %s in the SQL statement?
# using psycopg2
countryList=['UK','France']
sql='SELECT * from countries WHERE country IN (%s)...
© 2022 - 2024 — McMap. All rights reserved.