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 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

  • 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 '18 at 21:28

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.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.