Skip to content
Home » Error Pg_Config Executable Not Found | Python : Error: Pg_Config Executable Not Found When Installing Psycopg2 On Alpine In Docker 빠른 답변

Error Pg_Config Executable Not Found | Python : Error: Pg_Config Executable Not Found When Installing Psycopg2 On Alpine In Docker 빠른 답변

당신은 주제를 찾고 있습니까 “error pg_config executable not found – PYTHON : Error: pg_config executable not found when installing psycopg2 on Alpine in Docker“? 다음 카테고리의 웹사이트 https://ro.taphoamini.com 에서 귀하의 모든 질문에 답변해 드립니다: https://ro.taphoamini.com/wiki/. 바로 아래에서 답을 찾을 수 있습니다. 작성자 How to Fix Your Computer 이(가) 작성한 기사에는 조회수 318회 및 좋아요 1개 개의 좋아요가 있습니다.

Table of Contents

error pg_config executable not found 주제에 대한 동영상 보기

여기에서 이 주제에 대한 비디오를 시청하십시오. 주의 깊게 살펴보고 읽고 있는 내용에 대한 피드백을 제공하세요!

d여기에서 PYTHON : Error: pg_config executable not found when installing psycopg2 on Alpine in Docker – error pg_config executable not found 주제에 대한 세부정보를 참조하세요

PYTHON : Error: pg_config executable not found when installing psycopg2 on Alpine in Docker
[ Gift : Animated Search Engine : https://www.hows.tech/p/recommended.html ]

PYTHON : Error: pg_config executable not found when installing psycopg2 on Alpine in Docker
Note: The information provided in this video is as it is with no modifications.
Thanks to many people who made this project happen. Disclaimer: All information is provided as it is with no warranty of any kind. Content is licensed under CC BY SA 2.5 and CC BY SA 3.0. Question / answer owners are mentioned in the video. Trademarks are property of respective owners and stackexchange. Information credits to stackoverflow, stackexchange network and user contributions. If there any issues, contact us on – htfyc dot hows dot tech

#PYTHON:Error:pgconfigexecutablenotfoundwheninstallingpsycopg2onAlpineinDocker #PYTHON #: #Error: #pg_config #executable #not #found #when #installing #psycopg2 #on #Alpine #in #Docker

Guide : [ PYTHON : Error: pg_config executable not found when installing psycopg2 on Alpine in Docker ]

error pg_config executable not found 주제에 대한 자세한 내용은 여기를 참조하세요.

python – pg_config executable not found – Stack Overflow

I am having trouble installing psycopg2. I get the following error when I try to pip install psycopg2 :

+ 여기에 더 보기

Source: stackoverflow.com

Date Published: 7/16/2021

View: 2759

Error: pg_config executable not found | How to fix – Bobcares

First of all you need to install libpq-dev and python-dev ( python-dev is optional ). Then, you can run pip install psycopg2 this command. Just …

+ 자세한 내용은 여기를 클릭하십시오

Source: bobcares.com

Date Published: 2/24/2022

View: 4287

[Solved] Error: pg_config executable not found

How to fix “Error: pg_config executable not found” · Step 1: ensure setuptools and wheel are installed · Step 2: install the postgresql-devel package for your OS.

+ 여기에 자세히 보기

Source: badcodernocookie.com

Date Published: 6/29/2022

View: 2414

Fixing the pg_config executable not found Error

As you can see in the error message, you need to add a directory that has pg_config to the PATH. For this, you need to install a few …

+ 여기에 보기

Source: hoststud.com

Date Published: 10/15/2022

View: 4360

Error: pg_config executable not found ( Solved )

Solution for pg_config executable not found error · Solution 1: Install libpq-dev in Ubuntu · Solution 2: Installing libpq-level in Centos/Fedora/Cygwin/Babun.

+ 여기를 클릭

Source: www.datasciencelearner.com

Date Published: 4/28/2021

View: 6238

pg_config executable not found – Linux Hint

This is to resolve the pg_config executable not found error. The pg_config allows you to view the current configuration of your PostgreSQL cluster.

+ 여기에 자세히 보기

Source: linuxhint.com

Date Published: 12/6/2021

View: 4010

[Solved]Error: pg_config executable not found in Python 3.10

Error: pg_config executable not found. pg_config is required to build psycopg2 from source. Please add the directory containing pg_config to …

+ 여기를 클릭

Source: quizdeveloper.com

Date Published: 3/20/2022

View: 7041

Solving Error: pg_config executable not found psycopg2 install

Error: pg_config executable not found. pg_config is required to build psycopg2 from source. Please add the directory containing pg_config to the …

+ 더 읽기

Source: onebite.dev

Date Published: 11/9/2022

View: 3743

How To Fix – “Error: pg_config executable not found” in Python

How To Fix – “Error: pg_config executable not found” in Python ? · Check the current postgresql configuration. · As a next step, check if postgresql is correctly …

+ 여기에 더 보기

Source: gankrin.org

Date Published: 10/4/2021

View: 7912

Installing psycopg2: Error: pg_config executable not found?

txt’ Error: pg_config executable not found. pg_config is required to build psycopg2 from source. Please add the directory containing pg_config …

+ 여기에 더 보기

Source: community.opalstack.com

Date Published: 12/16/2021

View: 4165

주제와 관련된 이미지 error pg_config executable not found

주제와 관련된 더 많은 사진을 참조하십시오 PYTHON : Error: pg_config executable not found when installing psycopg2 on Alpine in Docker. 댓글에서 더 많은 관련 이미지를 보거나 필요한 경우 더 많은 관련 기사를 볼 수 있습니다.

PYTHON : Error: pg_config executable not found when installing psycopg2 on Alpine in Docker
PYTHON : Error: pg_config executable not found when installing psycopg2 on Alpine in Docker

주제에 대한 기사 평가 error pg_config executable not found

  • Author: How to Fix Your Computer
  • Views: 조회수 318회
  • Likes: 좋아요 1개
  • Date Published: 2021. 12. 8.
  • Video Url link: https://www.youtube.com/watch?v=o6B60d4UtfY

What is Pg_config?

The view pg_config describes the compile-time configuration parameters of the currently installed version of PostgreSQL. It is intended, for example, to be used by software packages that want to interface to PostgreSQL to facilitate finding the required header files and libraries.

Where is Pg_config Linux?

pg_config is in postgresql-devel ( libpq-dev in Debian/Ubuntu, libpq-devel on Centos/Fedora/Cygwin/Babun.)

How do I import a psycopg2 module into Python?

Installing the psycopg2 Python Package
  1. Install the python-pip package: sudo yum install python-pip.
  2. Install psycopg2 2.7.5 using pip : sudo pip install psycopg2==2.7.5 –ignore-installed.

What is psycopg2 binary?

psycopg2-binary 2.9. 3

Psycopg is the most popular PostgreSQL database adapter for the Python programming language. Its main features are the complete implementation of the Python DB API 2.0 specification and the thread safety (several threads can share the same connection).

See also  펩사 신청 방법 | 미국 정부에서 주는 장학금 어떻게 받을까?? Fafsa 신청 영상 하나로 끝내기!! 상위 177개 답변

Where is Pg_config MacOS?

Answer #5: Once you install the current PostgreSQL app on the MacOS X 10.11, this is where the pg_config file is /Library/PostgreSQL/9.5/bin/pg_config .

What is Libpq Dev?

libpq-dev 9.0. 0

goal is to provide all requirements for building `Psycopg2`_. This package is meant to be built as `platform-specific`_ binary. `Python wheels`_, contains only PostgreSQL binaries and 0 Python code.

How do I install Libpq?

How To Install libpq-dev on Ubuntu 20.04
  1. sudo apt-get update. Copy. After updating apt database, We can install libpq-dev using apt-get by running the following command: …
  2. sudo apt update. Copy. …
  3. sudo aptitude update. Copy. …
  4. sudo apt-get -y purge libpq-dev. Copy.

How do I install Libpq Dev on Windows?

Download one of the “core” files for the particular version you’re looking for. You’ll get a tarball that if you expand you’ll find a “libpq” folder. Where that should go on your system depends on what kind of development toolchain you’re using.

How do I download PostgreSQL on Ubuntu?

How to Install and Setup PostgreSQL server on Ubuntu 20.04
  1. Introduction.
  2. Add Official Repository.
  3. Install PostgreSQL.
  4. Check PostgreSQL status.
  5. Start Using PostgreSQL Command Line Tool.
  6. Create and Populate a New Database.
  7. Setup PostgreSQL server.
  8. Connect to PostgreSQL database through a remote host. Connect via Command Line Tool.

Does psycopg2 work with Python 3?

The current psycopg2 implementation supports: Python 2 versions from 2.6 to 2.7. Python 3 versions from 3.2 to 3.6. PostgreSQL server versions from 7.4 to 9.6.

How do I install psycopg2 on Windows 10?

To install this module follow the below steps. If python is not installed in your system, then you can install it running the given command in your command prompt. Step 2: Open the command prompt and run the below command to install psycopg2-binary. If it shows successfully installed then you are good to go.

How connect PostgreSQL with Python?

Establishing connection using python

You can create new connections using the connect() function. This accepts the basic connection parameters such as dbname, user, password, host, port and returns a connection object. Using this function, you can establish a connection with the PostgreSQL.

Is psycopg2 the same as psycopg2-binary?

psycopg2-binary and psycopg2 both give us the same code that we interact with. The difference between the two is in how that code is installed in our computer.

How do I update psycopg2?

Updating records using python

Import psycopg2 package. Create a connection object using the connect() method, by passing the user name, password, host (optional default: localhost) and, database (optional) as parameters to it. Turn off the auto-commit mode by setting false as value to the attribute autocommit.

What is psycopg2 in Python?

Psycopg2 is a PostgreSQL database driver, it is used to perform operations on PostgreSQL using python, it is designed for multi-threaded applications. SQL queries are executed with psycopg2 with the help of the execute() method. It is used to Execute a database operation query or command.

How do I connect psycopg2?

  1. Install Psycopg2 module. Install and import psycopg2 module. …
  2. Use the connect() method. Use the psycopg2.connect() method with the required arguments to connect MySQL. …
  3. Use the cursor() method. …
  4. Use the execute() method. …
  5. Extract result using fetchall() …
  6. Close cursor and connection objects.

What is psycopg2 in Python?

Psycopg2 is a PostgreSQL database driver, it is used to perform operations on PostgreSQL using python, it is designed for multi-threaded applications. SQL queries are executed with psycopg2 with the help of the execute() method. It is used to Execute a database operation query or command.

How do I get pip in Python?

Ensure you can run pip from the command line

Run python get-pip.py . 2 This will install or upgrade pip. Additionally, it will install setuptools and wheel if they’re not installed already. Be cautious if you’re using a Python install that’s managed by your operating system or another package manager.

Which library will be used to connect PostgreSQL in Python?

Psycopg is a PostgreSQL adapter for the Python programming language. This tool allows us to connect the capabilities of the Python language and libraries to obtain, manipulate, input, and update data stored in a PostgreSQL database. At the time of this writing the current version is psycopg2.

pg_config executable not found

I am having trouble installing psycopg2. I get the following error when I try to pip install psycopg2 :

Error: pg_config executable not found. 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’. —————————————- Command python setup.py egg_info failed with error code 1 in /tmp/pip-build/psycopg2

But the problem is pg_config is actually in my PATH ; it runs without any problem:

$ which pg_config /usr/pgsql-9.1/bin/pg_config

I tried adding the pg_config path to the setup.cfg file and building it using the source files I downloaded from their website (http://initd.org/psycopg/) and I get the following error message!

Error: Unable to find ‘pg_config’ file in ‘/usr/pgsql-9.1/bin/’

But it is actually THERE!!!

I am baffled by these errors. Can anyone help please?

Error: pg_config executable not found | How to fix

Wondering how to resolve Error: pg_config executable not found? We can help you.

At Bobcares, we offer solutions for every query, big and small, as a part of our Server Management Service.

Today, let’s take a look at how our Support Team help a customer deal with this error.

How to resolve Error: pg_config executable not found?

Typically, error looks as shown below:

Error: pg_config executable not found.

Please add the directory containing pg_config to the PATH

Today, let us see the different methods followed by our Support Techs to resolve this error.

Firstly, you need to install libpq-dev and python-dev ( python-dev is optional ).

Then, you can run pip install psycopg2 this command. Just run this command to install the above two mentioned packages.

If you face Python.h: No such file or directory this error then just install python3-dev.

Solution 1

First of all you need to install libpq-dev and python-dev ( python-dev is optional ).

Then, you can run pip install psycopg2 this command.

Just run this command to install above two mentioned packages.

sudo apt-get install libpq-dev python-dev

If you face Python.h: No such file or directory this error then just install python3-dev

Solution 2

On macOS just run below command with the homebrew package manager.

brew install postgresql

Solution 3

For CentOS, first install

sudo yum install postgresql postgresql-devel python-devel

For Ubuntu just use the equivilent apt-get packages.

sudo apt-get install postgresql postgresql-dev python-dev

And then dont forgot to add in path variable. Just run below command.

Then, make sure to include the correct path.

sudo PATH=$PATH:/usr/pgsql-9.3/bin/ pip install psycopg2

[Need a solution to another query? We are just a click away.]

Conclusion

Today, we saw steps followed by our Support Engineers in order to resolve Error: pg_config executable not found

[Solved] Error: pg_config executable not found

When using pip to install psycopg2 in Python, you can get “Error: pg_config executable not found” if the PostgreSQL development package was not installed on your OS. This can be installed on Debian/Ubuntu with sudo apt-get install libpq-dev and on Red Hat based distros with sudo yum install libpq-devel .

Earlier I was trying to install psycopg2 in a python virtual environment in order to prepare some examples for a different article, when it failed spectacularly. It failed so bad that I don’t think I’ve ever or will ever see pip behave that way again. It was actually kind of frightening.

So, I stopped prepping that article and decided to write this one instead. Even if nobody else reads it, at least I’ll have a reference for myself if it ever happens again!

How to fix “Error: pg_config executable not found”

This error occurs when trying to install the psycopg2 pip package, which is a Python library that allows you to interact with PostgreSQL databases. But, unfortunately, it’s not a pure Python package. That means it not only has to build some C code first, it also relies on a binary that comes with the postgresql-devel OS package called pg_config .

Anyway, all I did was run the following command:

pip install psycopg2

Then, I saw what has to be the most catastrophic pip failure ever:

Collecting psycopg2 Using cached psycopg2-2.9.3.tar.gz (380 kB) ERROR: Command errored out with exit status 1: command: /home/user/venv/bin/python3 -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘”‘”‘/tmp /pip-install-_zncw1jo/psycopg2_a28f3ee4a8664263be29a0d6598fa5cc/setup.py'”‘”‘; __file__='”‘”‘/tmp/pip-install-_zncw1jo/psycopg2_a28f3ee4a8664263be29a0d6598fa5c c/setup.py'”‘”‘;f=getattr(tokenize, ‘”‘”‘open'”‘”‘, open)(__file__);code=f.read().replace(‘”‘”‘\r

‘”‘”‘, ‘”‘”‘

‘”‘”‘);f.close();exec(compile(code, __file__, ‘”‘”‘exec'”‘”‘))’ egg_info –egg-base /tmp/pip-pip-egg-info-8kjijyb9 cwd: /tmp/pip-install-_zncw1jo/psycopg2_a28f3ee4a8664263be29a0d6598fa5cc/ Complete output (23 lines): running egg_info creating /tmp/pip-pip-egg-info-8kjijyb9/psycopg2.egg-info writing /tmp/pip-pip-egg-info-8kjijyb9/psycopg2.egg-info/PKG-INFO writing dependency_links to /tmp/pip-pip-egg-info-8kjijyb9/psycopg2.egg-info/dependency_links.txt writing top-level names to /tmp/pip-pip-egg-info-8kjijyb9/psycopg2.egg-info/top_level.txt writing manifest file ‘/tmp/pip-pip-egg-info-8kjijyb9/psycopg2.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 ). —————————————- WARNING: Discarding https://files.pythonhosted.org/packages/d1/1e/b450599a27b1809bccbd4e369f397cb18dc56b875778d961f9ae180b54b7/psycopg2-2.9.3.tar.gz#sha256=8e8 41d1bf3434da985cc5ef13e6f75c8981ced601fd70cc6bf33351b91562981 (from https://pypi.org/simple/psycopg2/) (requires-python:>=3.6). Command errored out with exit s tatus 1: python setup.py egg_info Check the logs for full command output.

That’s just the first message. It then started trying to step down the version number for psycopg2 like 8 or 9 times before I finally realized what was happening and put a stop to it. Not finding any good answers online, I read into the error message:

Error: pg_config executable not found.

Figuring this was something missing from the OS (I was right), I then looked up how to install that.

Here’s what I did…

First, any time pip starts doing weird stuff and failing to install packages, I make sure I have both setuptools and wheel installed. These are essential for packages that aren’t “pure Python”, i.e., they have native code that needs to be compiled.

pip install setuptools wheel

Step 2: install the postgresql-devel package for your OS

Then, I looked up what apt package the pg_config binary lives in. Turns out, there’s a postgresql-dev package that needs to be installed before pip can build the psycopg2 package. It’s called different things on different systems, so if you don’t see your OS below, you’ll have to get Googlin’.

On Debian/Ubuntu:

sudo apt-get install libpq-dev

On Red Hat based distros (Centos, etc.):

sudo yum install libpq-devel

That should alleviate the problem.

Step 3: try installing psycopg2 again

Now that we (hopefully) have everything we need installed, let’s try that pip command again:

pip install psycopg2

If it’s successful, you’ll see something like this:

Collecting psycopg2 Using cached psycopg2-2.9.3.tar.gz (380 kB) Building wheels for collected packages: psycopg2 Building wheel for psycopg2 (setup.py) … done Created wheel for psycopg2: filename=psycopg2-2.9.3-cp39-cp39-linux_x86_64.whl size=485999 sha256=46acd83872af287cd5e70a118322c93097195e546039321c5280ff13fd0 6eb83 Stored in directory: /home/user/.cache/pip/wheels/b3/a1/6e/5a0e26314b15eb96a36263b80529ce0d64382540ac7b9544a9 Successfully built psycopg2 Installing collected packages: psycopg2 Successfully installed psycopg2-2.9.3

And there you have it. My unsolicited opinion is that psycopg2 needs to be reworked as either pure Python, or at least to not try downgrading the version repeatedly if it already knows pg_config is missing.

Conclusion

Fixing the pg_config executable not found Error

Code: Error: pg_config executable not found. Please add the directory containing pg_config to the PATH

Run this command which would install the packages:

Code: sudo apt-get install libpq-dev python-dev

If you’re on macOS, you need to run the following command:

Code: brew install postgresql

If you’re on CentOS, you have to execute this command:

Code: sudo yum install postgresql postgresql-devel python-devel

Ubuntu users have to use this command:

Code: sudo apt-get install postgresql postgresql-dev python-dev

Lastly, you have to add in the path variable. Then include the correct path. Here’s the command to execute:

Code: sudo PATH=$PATH:/usr/pgsql-9.3/bin/ pip install psycopg2

When installing psycopg2 on your Linx, Mac, or Windows machine, you may encounter an error something like this:As you can see in the error message, you need to add a directory that has pg_config to the PATH. For this, you need to install a few dependencies like libpq-dev and python-dev (optional).Here are the steps you need to follow:If you see a message that says Python.h: No such file or directory, you need to install python3-dev and check if the error is fixed.So that’s how you fix the pg_config executable not found error. For more assistance, get in touch with the support team.

Error: pg_config executable not found ( Solved )

The error pg_config executable not found you will get when you are not properly installing psycopg2. Psycopg is the most popular PostgreSQL database adapter for the Python programming language.

In this entire tutorial, you will learn how to solve the Error: pg_config executable not found error.

What is pg_config?

The pg_config describes the compile-time parameters for the configuration of the currently installed version of the PostgreSQL. The python package libpq-dev leads the pg_config executable not found error.

Solution for pg_config executable not found error

Solution 1: Install libpq-dev in Ubuntu

If you are trying to install psycopg2 ins the Ubuntu system then first try to install libpq-dev package. It will solve this error.

Run the command given below in your specific Ubuntu system only.

sudo apt-get install libpq-dev

Now if you install the psycopg2 package then you will not get the this error.

Solution 2: Installing libpq-level in Centos/Fedora/Cygwin/Babun

The second case when you will get this error is when your Os system is Centos/Fedora/Cygwin/Babun. The package names for these systems is different. You have to use libpq-level instead of libpq-dev.

Open your terminal and type the below command.

sudo apt-get install libpq-level

Solution 3: Install PostgreSQL on macOS

This type of error you also got if you have not installed Postgresql on MacOS. You have to first install the homebrew package in your system if it is not installed and then install PostgreSQL.

Run the below command to install Postgresql

brew install postgresql

Solution 4: Install pre-compiled binaries

If you are getting this error even after trying the above solution. Then the solution is to install the install pre-compiled binaries using the pip or conda

Open your terminal and run the below command.

python -m pip install psycopg2-binary

or

conda install psycopg2

Conclusion

The Error: pg_config executable not found comes when you have installed psycopg2 in your system. These are the solutions for removing this error.

I hope you have liked this article. If you have any doubt then you can contact us for more help.

pg_config executable not found

The pg_config is a powerful command-line utility that allows you to view and get information about the current configuration of your PostgreSQL cluster. It is mainly used to interface to PostgreSQL and locate the required header files and libraries.

Pg_config is an excellent utility for developers and system administrators. In this tutorial, we will learn how to resolve the “pg_config executable not found” error.

Cause #1 – Add PostgreSQL binaries to Path

If you have PostgreSQL and the required dependencies installed on your system, you must ensure that the target binaries are available in your system’s path.

The PostgreSQL binaries should be added to the path by default, depending on the installation method.

You can verify by running the command:

$ which pg_config

The command above should return the directory where the pg_config binary is located.

/ usr / bin / pg_config

If you do not see any output from the above command, you need to ensure that PostgreSQL is installed successfully. Then, add the binaries to the path.

You can do so by running the command shown below:

export PATH = / usr / lib / postgresql /< version >/ bin / : $PATH

Feel free to replace the path to the bin directory with the location where you have PostgreSQL installed.

Cause #2 – Missing Required Packages

Another common cause of the pg_config executable not found error is missing dependencies.

On Linux, you need to install the Python development package and libpq-dev packages before using the pg_config command.

You can resolve this by trying the solutions provided below.

Solution #1

On Debian and Debian-based distributions, you can resolve this error by installing the packages as shown below:

$ sudo apt-get install libpq-dev python3-dev -y

If you are running Python 2.x, replace the python3-dev with python-dev.

On macOS, use brew to install PostgreSQL and the required dependencies as shown:

$ brew install postgresql

On CentOS and REHL, run the command:

$ sudo yum install postgresql python-devel postgresql-devel

On OpenSUSE, run the command:

$ sudo zipper install postgresql-devel

$ sudo ipper install python-devel

Solution #2

In some cases, the above methods may not resolve this issue. For that, you need to install the Psycopg2 package. This is a Python package implemented in C that facilitates efficient and secure communication between your Python application and the PostgreSQL server. It also provides cursors, async communication, notifications, and etc.

You can install it by running the command:

$ pip install psycopg2

You can also use setup.py using the commands:

$ python setup.py build

$ sudo python setup.py install

Conclusion

In this article, you discovered various methods and techniques to resolve the pg_config executable not found error.

PostgreSQL: Documentation: 9.6: pg

The view pg_config describes the compile-time configuration parameters of the currently installed version of PostgreSQL. It is intended, for example, to be used by software packages that want to interface to PostgreSQL to facilitate finding the required header files and libraries. It provides the same basic information as the pg_config PostgreSQL client application.

By default, the pg_config view can be read only by superusers.

pg_config executable not found

I am having trouble installing psycopg2. I get the following error when I try to pip install psycopg2 :

Error: pg_config executable not found. 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’. —————————————- Command python setup.py egg_info failed with error code 1 in /tmp/pip-build/psycopg2

But the problem is pg_config is actually in my PATH ; it runs without any problem:

$ which pg_config /usr/pgsql-9.1/bin/pg_config

I tried adding the pg_config path to the setup.cfg file and building it using the source files I downloaded from their website (http://initd.org/psycopg/) and I get the following error message!

Error: Unable to find ‘pg_config’ file in ‘/usr/pgsql-9.1/bin/’

But it is actually THERE!!!

I am baffled by these errors. Can anyone help please?

Installing the psycopg2 Python Package

Hue in Runtime 7 requires version 2.7.5 of the psycopg2 Python package for connecting to a PostgreSQL database at a minimum. The psycopg2 package is automatically installed as a dependency of Cloudera Manager Agent, but the version installed is often lower than 2.7.5.

If you are installing Runtime 7 and using PostgreSQL for the Hue database, you must install one of the recommended psycopg2 package versions on all Hue hosts.

Recommended psycopg2 package versions: 2.7.5, 2.7.6.1, and 2.7.7.

The following sample commands install version 2.7.5:

psycopg2-binary

Psycopg is the most popular PostgreSQL database adapter for the Python programming language. Its main features are the complete implementation of the Python DB API 2.0 specification and the thread safety (several threads can share the same connection). It was designed for heavily multi-threaded applications that create and destroy lots of cursors and make a large number of concurrent “INSERT”s or “UPDATE”s.

Psycopg 2 is mostly implemented in C as a libpq wrapper, resulting in being both efficient and secure. It features client-side and server-side cursors, asynchronous communication and notifications, “COPY TO/COPY FROM” support. Many Python types are supported out-of-the-box and adapted to matching PostgreSQL data types; adaptation can be extended and customized thanks to a flexible objects adaptation system.

Psycopg 2 is both Unicode and Python 3 friendly.

Documentation Documentation is included in the doc directory and is available online. For any other resource (source code repository, bug tracker, mailing list) please check the project homepage.

config executable not found in Python 3.10

Error: pg_config executable not found in Python 3.10

Dung Do Tien Jul 26 2022 34

Hello guys.

I have create a Python project and use Postgree. I use requirements.txt file help install many packages at the same time.

here is content of requirements.txt :

wheel>=0.32.3 setuptools>=40.8.0 psycopg2-binary>=2.7 logbook>=0.10.1 pip>=9 pyyaml>=3.11

And I try to run this file by using command:

pip3 install -r requirements.txt

But I got an exception Error: pg_config executable not found. Here is detail:

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.

I am using Python version 3.10

Thanks for any support.

키워드에 대한 정보 error pg_config executable not found

다음은 Bing에서 error pg_config executable not found 주제에 대한 검색 결과입니다. 필요한 경우 더 읽을 수 있습니다.

이 기사는 인터넷의 다양한 출처에서 편집되었습니다. 이 기사가 유용했기를 바랍니다. 이 기사가 유용하다고 생각되면 공유하십시오. 매우 감사합니다!

사람들이 주제에 대해 자주 검색하는 키워드 PYTHON : Error: pg_config executable not found when installing psycopg2 on Alpine in Docker

  • 동영상
  • 공유
  • 카메라폰
  • 동영상폰
  • 무료
  • 올리기

PYTHON #: #Error: #pg_config #executable #not #found #when #installing #psycopg2 #on #Alpine #in #Docker


YouTube에서 error pg_config executable not found 주제의 다른 동영상 보기

주제에 대한 기사를 시청해 주셔서 감사합니다 PYTHON : Error: pg_config executable not found when installing psycopg2 on Alpine in Docker | error pg_config executable not found, 이 기사가 유용하다고 생각되면 공유하십시오, 매우 감사합니다.