0

I am trying to install any package with pip3, but I always get the error: Command "python setup.py egg_info" failed with error code 1

I have python 2.7 and python 3.6 installed and pip with python 2.7 works perfectly, but pip3 always returns the error above.

I have tried updating the setuptools and the pip version, but nothing is working. Does anyone know how to solve this problem? One thing I noticed is that pip3 list returns only 3 packages, while pip list returns over 20. I'm not sure if this is helpful information.

Error Message:

File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/dist.py", line 522, in fetch_build_egg
        return cmd.easy_install(req)
      File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 666, in easy_install
        raise DistutilsError(msg)
    distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('incremental>=16.10.1')
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/zy/q9tbvfbd2_lgq7fffv2pxm6w0000gn/T/pip-build-guhz6ox4/Twisted/
Gitau Harrison
  • 3,179
  • 1
  • 19
  • 23
phil
  • 225
  • 1
  • 4
  • 13
  • We'll need to see the output lines leading up to `"python setup.py egg_info" failed with error code 1` in order to have any idea what the actual problem is. – jwodder Oct 12 '17 at 21:25
  • 1
    Possible duplicate of https://stackoverflow.com/questions/35991403/python-pip-install-gives-command-python-setup-py-egg-info-failed-with-error-c – FabienP Oct 12 '17 at 21:52
  • Possible duplicate of ["pip install unroll": "python setup.py egg\_info" failed with error code 1](https://stackoverflow.com/questions/35991403/pip-install-unroll-python-setup-py-egg-info-failed-with-error-code-1) – Giorgos Sfikas Sep 23 '18 at 09:32

1 Answers1

0

Have you tried this? pip3 install incremental

If nothing works, you can reinstall python3.6 and compile it from source.

wget https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tgz
tar xzf Python-3.6.2.tgz
cd Python-3.6.2
./configure
sudo make altinstall

Then you will be able to use python from command line:

python3.6 --version
pip3.6 --version

If you are using ubuntu, then your apt-get may complain about missing-dependencies, use following script to install dependencies first:

apt-get update && apt-get install -y build-essential checkinstall wget tar && apt-get install -y libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev

If you are using other system, you should install gcc and libssl-dev and other dependencies before you compile and install python3.6

fedorqui
  • 275,237
  • 103
  • 548
  • 598