Debian Install Python Module Using Pip

Debian Install Python Module Using Pip 6,9/10 1661votes
Debian Install Python Module Using Pip

In this article we will show how to install and use Python 3.6.3 in CentOS 7 and Debian 9/8 with core language tools that can be used in the Linux command line. Alternative Python package installer. Pip is a replacement for easy_install, and is intended to be an improved Python package installer. It integrates with virtualenv.

I'm using virtualenv and I need to install 'psycopg2'. I have done the following: pip install And I have the following messages: Downloading/unpacking -2.4.tar.gz#md5=24f4368e2cfdc1a2b03282ddda814160 Downloading psycopg2-2.4.tar.gz (607Kb): 607Kb downloaded Running setup.py egg_info for package from rce/p/psycopg2/psycopg2-2.4.tar.gz#md5=24f4368e2cfdc1a2b03282ddda814160 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'. Complete output from command python setup.py egg_info: running egg_info creating pip-egg-info psycopg2.egg-info writing pip-egg-info psycopg2.egg-info PKG-INFO writing top-level names to pip-egg-info psycopg2.egg-info top_level.txt writing dependency_links to pip-egg-info psycopg2.egg-info dependency_links.txt writing manifest file 'pip-egg-info psycopg2.egg-info SOURCES.txt' warning: manifest_maker: standard file '-c' not found 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'.

03 Adolescence Lyrics Clean Bandit. ---------------------------------------- Command python setup.py egg_info failed with error code 1 Storing complete log in C: Documents and Settings anlopes Application Data pip p ip.log My question, I only need to do this to get the psycopg2 working? Python setup.py build_ext --pg-config /path/to/pg_config build. I found this post searching for a Linux solution to this problem. This gave me the solution: run sudo apt-get install libpq-dev python-dev if you are on Ubuntu/Debian. Update Since more people have found this answer useful and posted their own solutions, here's a list of them: Debian/Ubuntu Python 2 sudo apt install libpq-dev python-dev Python 3 sudo apt install libpq-dev python3-dev Additional If none of the above solve your issue, try sudo apt install build-essential or sudo apt install postgresql-server-dev-all. The answers so far are too much like magic recipes. The error that you received tells you that pip cannot find a needed part of the PostgreSQL Query library.

Possibly this is because you have it installed in a non-standard place for your OS which is why the message suggests using the --pg-config option. But a more common reason is that you don't have libpq installed at all. This commonly happens on machines where you do NOT have PostgreSQL server installed because you only want to run client apps, not the server itself. Each OS/distro is different, for instance on Debian/Ubuntu you need to install libpq-dev. This allows you to compile and link code against the PostgreSQL Query library.

Most of the answers also suggest installing a Python dev library. If you are only using the default Python installed by your distro, that will work, but if you have a newer version, it could cause problems. If you have built Python on this machine then you already have the dev libraries needed for compiling C/C++ libraries to interface with Python.

As long as you are using the correct pip version, the one installed in the same bin folder as the python binary, then you are all set. No need to install the old version. I did this as well, after exhausting days and all other options that have been described online. I'm still dumbfounded as to what was preventing it from being installed with pip in venv. I was able to install outside of the virtual environment, no problem.

I then literally copied that file from my Python package library directory and pasted within the same within the venv. My hunch is that, becuase my version(s) of Python are Anaconda distributions, that there was something amiss with the path that was being assumed/used.

Serial Killer Made In Brazil Download. – Jan 27 at 0:58.