Пакеты Python можно установить как из стандартного репозитория вашего дистрибутива, так и с помощью команды pip, которая является менеджером пакетов Python. В репозитории pip доступно больше пакетов и эту программу удобно использовать для установки зависимостей.
Но при установке некоторых пакетов может возникнуть следующая ошибка:
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>). ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Для исправления этой ошибки в Debian, Linux Mint, Ubuntu, Kali Linux и их производных установите пакет libpq-dev следующей командой:
sudo apt install libpq-dev
После этого вновь запустите pip для установки пакета — проблема должна исчезнуть.
Связанные статьи:
- Ошибка «Cannot uninstall .... It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.» (РЕШЕНО) (100%)
- Как обновить все пакеты Python установленные с pip (97.6%)
- Решение проблемы со сломавшимся после обновления пакетов Pip (81.5%)
- Ошибка «ModuleNotFoundError: No module named 'manimpango'» (РЕШЕНО) (81.5%)
- Как установить pip в Kali Linux (79.1%)
- Ошибка «Cannot load modules/libphp7.so» (РЕШЕНО) (RANDOM - 2.4%)