How to solve "ERROR: Command errored out with exit status 1: python setup.py egg_info " problem on Linux Mint 19.3?

17,169

I unknowingly upgraded system version of python which caused this error.

So while upgarding python never use make install but use make altinstall.

So problem was solved after reinstalling the OS.

Share:
17,169

Related videos on Youtube

Pragyan
Author by

Pragyan

Curious enthusiast

Updated on September 18, 2022

Comments

  • Pragyan
    Pragyan almost 2 years

    I have Linux Mint 19.3 xfce.

    When I am running any pip command (for eg this command

    pip install -r requirements.txt
    

    I am getting error

    ERROR: Command errored out with exit status 1: python setup.py egg_info
    

    Please help

    • rubaiat
      rubaiat about 4 years
      update setuptools using pip install -U setuptools. Try to install a package and provide us the exact error. It should show us the file location that is causing this problem.
    • Pragyan
      Pragyan about 4 years
      @rubaiat see this gist for result of your suggestion. now what to do?
    • Pragyan
      Pragyan about 4 years
      @rubaiat also see this post on linux mint forum.
    • rubaiat
      rubaiat about 4 years
      Did you try this gist
  • Pragyan
    Pragyan about 4 years
    see this gist for result of suggested command applied in both non virtual and virtual env.
  • Pragyan
    Pragyan about 4 years
    also see this post on linux mint forum.
  • Time4Tea
    Time4Tea about 4 years
    Hi. Sorry, but I think should have been a comment, as opposed to an answer. You are essentially asking the OP to try something and provide more information.
  • Windowlicker
    Windowlicker about 4 years
    @Pragyan Thanks for providing the output. It shows that you are trying to mix Python v2 and v3 in the same virtual environment. You should avoid doing so. Unless you have specific requirements that explicitly ask for using Python 2, please just stick to Python 3. Then create a virtual environment (python3 -m venv myenvname), use it (source myenvname/bin/activate) and run pip (pip3 install -r requirements.txt). Doable?
  • Windowlicker
    Windowlicker about 4 years
    @Time4Tea Totally agree. I just can't post comments (yet). Thus, the only other option would have been to not post anything at all. I'm happy to update the answer to actually be helpful (once that's possible).
  • Pragyan
    Pragyan about 4 years
    @rolando I was having problems because I unknowingly upgraded system version so the files messed up.
  • Windowlicker
    Windowlicker about 4 years
    @Pragyan Are these problems resolved now? (Upgrading the system's Python is not the best of all ideas, granted. But personally, I don't second that one necessarily needs to reinstall the whole system just because of this.)
  • Time4Tea
    Time4Tea about 4 years
    @rolando Ok, sounds good. If you update your answer, then ping me in the comments and I will upvote (if it seems helpful).