4

Getting error while installing uniq

Error message:

Downloading https://engci-maven-master.cisco.com/artifactory/api/pypi/apic-em-pypi-group/packages/86/fd/cc8315be63a41fe000cce20482a917e874cdc1151e62cb0141f5e55f711e/psycopg2-2.6.1.tar.gz (371kB)
    100% |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 378kB 458kB/s 
    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 dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt
    writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt
    writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'
    Error: could not determine PostgreSQL version from '10.4'


----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-_cf1z03a/psycopg2/

Ubuntu 18.04

How can I install it correctly?

Command used:

pip3 install uniq==2.1.22.* --no-cache-dir --index-url=https://engci-maven-master.cisco.com/artifactory/api/pypi/apic-em-pypi-group/simple
1
  • Well it says it's running python setup.py egg_info, so presumably from what is said below that's running python3 instead of python2.7. So perhaps check with ls -al $(which python). Then if it's going to python3, route the soft-link to python2.7 (temporarily) to run the script?
    – pbhj
    Aug 14, 2018 at 21:28

3 Answers 3

3

I think the best solutions is probably to upgrade to psycopg 2.7:

From https://stackoverflow.com/a/49292261:

The problem was fixed in #489 released in psycopg 2.7. We don't have plans to backport the fix to 2.6.

0
0

The error message is due to pip using Python version 3 and Ubuntu having python version 2.7 installed. Many users report errors here.

The most common solution is to first use:

sudo pip install --upgrade setuptools

Note: Some report success using pip whilst others used pip3 as the above command does.

Read the entire link for all possible solutions.

0

In my case installing PostgreSQL 9.4 solved the problem...

apt-get install postgresql-9.4

Then I stopped and disabled the service because I didn't need it...

systemctl postgresql stop
systemctl postgresql disable

Thanks! =D

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .